From 93ab3407ff343fc9714706cefeb8fe1db7788dbc Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Fri, 24 May 2024 09:55:08 -0400 Subject: [PATCH] rename settings/ci-test.py to settings/ci_test.py (#4391) # What this PR does Related to Drone -> GitHub Actions migration --- .drone.yml | 4 ++-- .github/workflows/linting-and-tests.yml | 2 +- Makefile | 4 ++-- engine/apps/mobile_app/tests/test_alert_rendering.py | 2 +- engine/settings/{ci-test.py => ci_test.py} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename engine/settings/{ci-test.py => ci_test.py} (100%) diff --git a/.drone.yml b/.drone.yml index 21678bc6..a922bff0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -53,7 +53,7 @@ steps: - name: Lint Backend image: python:3.11.4 environment: - DJANGO_SETTINGS_MODULE: settings.ci-test + DJANGO_SETTINGS_MODULE: settings.ci_test commands: - pip install $(grep "pre-commit==" engine/requirements-dev.txt) - pre-commit run isort --all-files @@ -64,7 +64,7 @@ steps: image: python:3.11.4 environment: RABBITMQ_URI: amqp://rabbitmq:rabbitmq@rabbit_test:5672 - DJANGO_SETTINGS_MODULE: settings.ci-test + DJANGO_SETTINGS_MODULE: settings.ci_test SLACK_CLIENT_OAUTH_ID: 1 commands: - apt-get update && apt-get install -y netcat-traditional diff --git a/.github/workflows/linting-and-tests.yml b/.github/workflows/linting-and-tests.yml index 8dedefed..d41421b1 100644 --- a/.github/workflows/linting-and-tests.yml +++ b/.github/workflows/linting-and-tests.yml @@ -12,7 +12,7 @@ name: Linting and Tests merge_group: env: - DJANGO_SETTINGS_MODULE: settings.ci-test + DJANGO_SETTINGS_MODULE: settings.ci_test DATABASE_HOST: localhost RABBITMQ_URI: amqp://rabbitmq:rabbitmq@localhost:5672 SLACK_CLIENT_OAUTH_ID: 1 diff --git a/Makefile b/Makefile index 46ee7d89..fa4f5a1a 100644 --- a/Makefile +++ b/Makefile @@ -108,10 +108,10 @@ define run_ui_docker_command $(call run_docker_compose_command,run --rm oncall_ui sh -c '$(1)') endef -# always use settings.ci-test django settings file when running the tests +# always use settings.ci_test django settings file when running the tests # if we use settings.dev it's very possible that some fail just based on the settings alone define run_backend_tests - $(call run_engine_docker_command,pytest --ds=settings.ci-test $(1)) + $(call run_engine_docker_command,pytest --ds=settings.ci_test $(1)) endef .PHONY: local/up diff --git a/engine/apps/mobile_app/tests/test_alert_rendering.py b/engine/apps/mobile_app/tests/test_alert_rendering.py index 6b8c39d9..f96df843 100644 --- a/engine/apps/mobile_app/tests/test_alert_rendering.py +++ b/engine/apps/mobile_app/tests/test_alert_rendering.py @@ -8,7 +8,7 @@ from apps.mobile_app.backend import MobileAppBackend MAX_ALERT_TITLE_LENGTH = 200 -# this is a dirty hack to get around EXTRA_MESSAGING_BACKENDS being set in settings/ci-test.py +# this is a dirty hack to get around EXTRA_MESSAGING_BACKENDS being set in settings/ci_test.py # we can't simply change the value because 100s of tests fail as they rely on the value being set to a specific value 🫠 # see where this value is used in the unitest.mock.patch calls down below for more context backend = MobileAppBackend(notification_channel_id=5) diff --git a/engine/settings/ci-test.py b/engine/settings/ci_test.py similarity index 100% rename from engine/settings/ci-test.py rename to engine/settings/ci_test.py