From 2743f68beed30333921a1a5aba71b814e0ca64a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannik=20J=C3=BCrgens?= Date: Wed, 20 Oct 2021 13:56:20 +0200 Subject: [PATCH 1/3] main(tests): remove rabbitmq from unit-tests service --- docker-compose.override.integration_tests.yml | 3 +++ docker-compose.override.unit_tests_cicd.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker-compose.override.integration_tests.yml b/docker-compose.override.integration_tests.yml index 1cdc9e42c8..f4595102ec 100644 --- a/docker-compose.override.integration_tests.yml +++ b/docker-compose.override.integration_tests.yml @@ -54,6 +54,9 @@ services: MYSQL_DATABASE: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" volumes: - defectdojo_data_integration_tests:/var/lib/mysql + rabbitmq: + image: busybox:1.34.0-musl + entrypoint: ['echo', 'skipping', 'rabbitmq'] volumes: defectdojo_data_integration_tests: {} defectdojo_media_integration_test: {} diff --git a/docker-compose.override.unit_tests_cicd.yml b/docker-compose.override.unit_tests_cicd.yml index fd5bf1e0c3..c078065a9f 100644 --- a/docker-compose.override.unit_tests_cicd.yml +++ b/docker-compose.override.unit_tests_cicd.yml @@ -34,6 +34,9 @@ services: MYSQL_DATABASE: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" volumes: - defectdojo_data_unittest:/var/lib/mysql + rabbitmq: + image: busybox:1.34.0-musl + entrypoint: ['echo', 'skipping', 'rabbitmq'] volumes: defectdojo_data_unittest: {} defectdojo_media_unittest: {} From e461d42e94fc0046925f1fec7baa15bb4f69f5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannik=20J=C3=BCrgens?= Date: Wed, 20 Oct 2021 14:06:33 +0200 Subject: [PATCH 2/3] main(tests): remove rabbitmq from unit-tests --- docker-compose.override.integration_tests.yml | 3 --- docker-compose.override.unit_tests.yml | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose.override.integration_tests.yml b/docker-compose.override.integration_tests.yml index f4595102ec..1cdc9e42c8 100644 --- a/docker-compose.override.integration_tests.yml +++ b/docker-compose.override.integration_tests.yml @@ -54,9 +54,6 @@ services: MYSQL_DATABASE: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" volumes: - defectdojo_data_integration_tests:/var/lib/mysql - rabbitmq: - image: busybox:1.34.0-musl - entrypoint: ['echo', 'skipping', 'rabbitmq'] volumes: defectdojo_data_integration_tests: {} defectdojo_media_integration_test: {} diff --git a/docker-compose.override.unit_tests.yml b/docker-compose.override.unit_tests.yml index a434230275..093797fb57 100644 --- a/docker-compose.override.unit_tests.yml +++ b/docker-compose.override.unit_tests.yml @@ -24,7 +24,6 @@ services: initializer: image: busybox:1.34.0-musl entrypoint: ['echo', 'skipping', 'initializer'] - mysql: ports: - target: 3306 @@ -35,6 +34,9 @@ services: MYSQL_DATABASE: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" volumes: - defectdojo_data_unittest:/var/lib/mysql + rabbitmq: + image: busybox:1.34.0-musl + entrypoint: ['echo', 'skipping', 'rabbitmq'] volumes: defectdojo_data_unittest: {} defectdojo_media_unittest: {} From 7663da595ada2d1ee683d8c1c9c12151671822b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannik=20J=C3=BCrgens?= Date: Tue, 2 Nov 2021 08:23:01 +0100 Subject: [PATCH 3/3] fix(tests): overwrite broker values from dockerfile --- docker-compose.override.unit_tests.yml | 7 +++++++ docker-compose.override.unit_tests_cicd.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/docker-compose.override.unit_tests.yml b/docker-compose.override.unit_tests.yml index 093797fb57..f4afdc8d4b 100644 --- a/docker-compose.override.unit_tests.yml +++ b/docker-compose.override.unit_tests.yml @@ -15,6 +15,13 @@ services: DD_DEBUG: 'True' DD_TEST_DATABASE_NAME: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" DD_DATABASE_NAME: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" + DD_CELERY_BROKER_SCHEME: 'sqla+sqlite' + DD_CELERY_BROKER_USER: '' + DD_CELERY_BROKER_PASSWORD: '' + DD_CELERY_BROKER_HOST: '' + DD_CELERY_BROKER_PORT: "-1" + DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite' + DD_CELERY_BROKER_PARAMS: '' celerybeat: image: busybox:1.34.0-musl entrypoint: ['echo', 'skipping', 'celery beat'] diff --git a/docker-compose.override.unit_tests_cicd.yml b/docker-compose.override.unit_tests_cicd.yml index c078065a9f..bf4e6b9f45 100644 --- a/docker-compose.override.unit_tests_cicd.yml +++ b/docker-compose.override.unit_tests_cicd.yml @@ -15,6 +15,13 @@ services: DD_DEBUG: 'True' DD_TEST_DATABASE_NAME: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" DD_DATABASE_NAME: "${DD_TEST_DATABASE_NAME:-test_defectdojo}" + DD_CELERY_BROKER_SCHEME: 'sqla+sqlite' + DD_CELERY_BROKER_USER: '' + DD_CELERY_BROKER_PASSWORD: '' + DD_CELERY_BROKER_HOST: '' + DD_CELERY_BROKER_PORT: "-1" + DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite' + DD_CELERY_BROKER_PARAMS: '' celerybeat: image: busybox:1.34.0-musl entrypoint: ['echo', 'skipping', 'celery beat']