Skip to content

Commit 471b1de

Browse files
committed
updates to github workflows to test with v3 locations set and unset; pass along this as envvar to testing containers
1 parent 2bfdb0a commit 471b1de

5 files changed

Lines changed: 21 additions & 7 deletions

.github/workflows/integration-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ jobs:
4141
"tests/notifications_test.py",
4242
"tests/tool_config.py",
4343
"openapi-validatator",
44-
4544
]
4645
os: [alpine, debian]
46+
v3_feature_locations: [true, false]
47+
exclude:
48+
# standalone create endpoint page is gone in v3
49+
- v3_feature_locations: true
50+
test-case: "tests/endpoint_test.py"
4751
fail-fast: false
52+
env:
53+
DD_V3_FEATURE_LOCATIONS: ${{ matrix.v3_feature_locations }}
4854

4955
steps:
5056
- name: Checkout

.github/workflows/rest-framework-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
platform:
77
type: string
88
default: "linux/amd64"
9+
v3_feature_locations:
10+
type: boolean
11+
default: false
912

1013
jobs:
1114
unit_tests:
1215
name: Rest Framework Unit Tests
1316
runs-on: ${{ inputs.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
14-
1517
strategy:
1618
matrix:
1719
os: [alpine, debian]
@@ -53,10 +55,11 @@ jobs:
5355

5456
# no celery or initializer needed for unit tests
5557
- name: Unit tests
56-
timeout-minutes: 20
58+
timeout-minutes: 25
5759
run: docker compose up --no-deps --exit-code-from uwsgi uwsgi
5860
env:
5961
DJANGO_VERSION: ${{ matrix.os }}
62+
DD_V3_FEATURE_LOCATIONS: ${{ inputs.v3_feature_locations }}
6063

6164
- name: Logs
6265
if: failure()

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ jobs:
2323

2424
test-rest-framework:
2525
strategy:
26-
matrix:
27-
platform: ['linux/amd64', 'linux/arm64']
28-
fail-fast: false
26+
matrix:
27+
platform: ['linux/amd64', 'linux/arm64']
28+
v3_feature_locations: [ false, true ]
29+
fail-fast: false
2930
needs: build-docker-containers
3031
uses: ./.github/workflows/rest-framework-tests.yml
3132
secrets: inherit
3233
with:
33-
platform: ${{ matrix.platform}}
34+
platform: ${{ matrix.platform }}
35+
v3_feature_locations: ${{ matrix.v3_feature_locations }}
3436

3537
# only run integration tests for linux/amd64 (default)
3638
test-user-interface:

docker-compose.override.integration_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ services:
3636
DD_SECURE_CROSS_ORIGIN_OPENER_POLICY: 'None'
3737
DD_SECRET_KEY: "${DD_SECRET_KEY:-.}"
3838
DD_EMAIL_URL: "smtp://mailhog:1025"
39+
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
3940
celerybeat:
4041
environment:
4142
DD_DATABASE_URL: ${DD_TEST_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo}
4243
celeryworker:
4344
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-worker-dev.sh']
4445
environment:
4546
DD_DATABASE_URL: ${DD_TEST_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo}
47+
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
4648
initializer:
4749
environment:
4850
PYTHONWARNINGS: error # We are strict about Warnings during testing

docker-compose.override.unit_tests_cicd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ services:
2828
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
2929
DD_CELERY_BROKER_PARAMS: ''
3030
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
31+
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
3132
celerybeat: !reset
3233
celeryworker: !reset
3334
initializer: !reset

0 commit comments

Comments
 (0)