Skip to content

Commit

Permalink
Use Postgres in rest-framework-tests (#9885)
Browse files Browse the repository at this point in the history
* Use Postgres in rest-framework-tests

* Try opposite values

---------

Co-authored-by: Cody Maffucci <[email protected]>
  • Loading branch information
kiblik and Maffooch authored Jun 4, 2024
1 parent c61c802 commit ec49eec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ jobs:
run: docker/setEnv.sh unit_tests_cicd

# phased startup so we can use the exit code from unit test container
- name: Start MySQL
run: docker compose --env-file ./docker/environments/mysql-redis.env up -d mysql
- name: Start Postgres
run: docker compose --env-file ./docker/environments/postgres-redis.env up -d postgres

# no celery or initializer needed for unit tests
- name: Unit tests
run: docker compose --profile mysql-redis --env-file ./docker/environments/mysql-redis.env up --no-deps --exit-code-from uwsgi uwsgi
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps --exit-code-from uwsgi uwsgi
env:
DJANGO_VERSION: ${{ matrix.os }}

- name: Logs
if: failure()
run: docker compose --profile mysql-redis --env-file ./docker/environments/mysql-redis.env logs --tail="2500" uwsgi
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env logs --tail="2500" uwsgi

- name: Shutdown
if: always()
run: docker compose --profile mysql-redis --env-file ./docker/environments/mysql-redis.env down
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env down
4 changes: 2 additions & 2 deletions unittests/test_rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ def __init__(self, *args, **kwargs):
self.permission_create = Permissions.Test_Add
self.permission_update = Permissions.Test_Edit
self.permission_delete = Permissions.Test_Delete
self.deleted_objects = 18
self.deleted_objects = 5
BaseClass.RESTEndpointTest.__init__(self, *args, **kwargs)


Expand Down Expand Up @@ -2676,7 +2676,7 @@ def __init__(self, *args, **kwargs):
}
self.update_fields = {'color': 'blue'}
self.test_type = TestType.CONFIGURATION_PERMISSIONS
self.deleted_objects = 2
self.deleted_objects = 1
BaseClass.RESTEndpointTest.__init__(self, *args, **kwargs)


Expand Down

0 comments on commit ec49eec

Please sign in to comment.