Skip to content

Commit

Permalink
Merge pull request #94 from cloudblue/fix_testing
Browse files Browse the repository at this point in the history
Fix Integration tests, they failed silently
  • Loading branch information
maxipavlovic authored Nov 9, 2022
2 parents 45342de + 93a77d8 commit 31e3d19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ Unit testing

Run tests with various RDBMS:
- `cd integration_tests`
- `DB=postgres docker-compose -f docker-compose.yml -f rdbms.yml up app_test`
- `DB=mysql docker-compose -f docker-compose.yml -f rdbms.yml up app_test`
- `DB=postgres docker-compose -f docker-compose.yml -f rdbms.yml run app_test`
- `DB=mysql docker-compose -f docker-compose.yml -f rdbms.yml run app_test`

Check code style: `flake8`
Run tests: `pytest`
Expand Down
6 changes: 3 additions & 3 deletions tests/test_replica/test_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def test_get_cqrs_retry_delay(settings, retry_delay, current_retry):
assert result is retry_delay


@pytest.mark.django_db
@pytest.mark.django_db(transaction=True)
def test_support_for_meta_create():
meta = TransportStub.consume(
TransportPayload(
Expand All @@ -565,7 +565,7 @@ def test_support_for_meta_create():
assert meta == {'Hello': 'world'}


@pytest.mark.django_db
@pytest.mark.django_db(transaction=True)
def test_support_for_meta_update():
models.CQRSMetaModel.objects.create(id=2, cqrs_revision=0, cqrs_updated=now())

Expand All @@ -589,7 +589,7 @@ def test_support_for_meta_update():
)


@pytest.mark.django_db
@pytest.mark.django_db(transaction=True)
def test_support_for_meta_delete():
models.CQRSMetaModel.objects.create(id=3, cqrs_revision=0, cqrs_updated=now())

Expand Down
4 changes: 2 additions & 2 deletions travis_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ if [ "$INTEGRATION_TESTS" == "yes" ]; then
docker-compose down --remove-orphans
docker-compose -f docker-compose.yml -f kombu.yml run master
docker-compose -f docker-compose.yml -f kombu.yml down --remove-orphans
DB=postgres docker-compose -f docker-compose.yml -f rdbms.yml up app_test
DB=mysql docker-compose -f docker-compose.yml -f rdbms.yml up app_test
DB=postgres docker-compose -f docker-compose.yml -f rdbms.yml run app_test
DB=mysql docker-compose -f docker-compose.yml -f rdbms.yml run app_test
docker-compose -f docker-compose.yml -f rdbms.yml down --remove-orphans

cd ..
Expand Down

0 comments on commit 31e3d19

Please sign in to comment.