Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ jobs:
"tests/notifications_test.py",
"tests/tool_config.py",
"openapi-validatator",

]
os: [alpine, debian]
v3_feature_locations: [true, false]
exclude:
# standalone create endpoint page is gone in v3
- v3_feature_locations: true
test-case: "tests/endpoint_test.py"
fail-fast: false
env:
DD_V3_FEATURE_LOCATIONS: ${{ matrix.v3_feature_locations }}

steps:
- name: Checkout
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
platform:
type: string
default: "linux/amd64"
v3_feature_locations:
type: boolean
default: false

jobs:
unit_tests:
name: Rest Framework Unit Tests
runs-on: ${{ inputs.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}

strategy:
matrix:
os: [alpine, debian]
Expand Down Expand Up @@ -53,10 +55,11 @@ jobs:

# no celery or initializer needed for unit tests
- name: Unit tests
timeout-minutes: 20
timeout-minutes: 25
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change is necessary anymore. We can drop it down again if you'd like and change it back if necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not hurt to keep it imo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

run: docker compose up --no-deps --exit-code-from uwsgi uwsgi
env:
DJANGO_VERSION: ${{ matrix.os }}
DD_V3_FEATURE_LOCATIONS: ${{ inputs.v3_feature_locations }}

- name: Logs
if: failure()
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ jobs:

test-rest-framework:
strategy:
matrix:
platform: ['linux/amd64', 'linux/arm64']
fail-fast: false
matrix:
platform: ['linux/amd64', 'linux/arm64']
v3_feature_locations: [ false, true ]
fail-fast: false
needs: build-docker-containers
uses: ./.github/workflows/rest-framework-tests.yml
secrets: inherit
with:
platform: ${{ matrix.platform}}
platform: ${{ matrix.platform }}
v3_feature_locations: ${{ matrix.v3_feature_locations }}

# only run integration tests for linux/amd64 (default)
test-user-interface:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.override.integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ services:
DD_SECURE_CROSS_ORIGIN_OPENER_POLICY: 'None'
DD_SECRET_KEY: "${DD_SECRET_KEY:-.}"
DD_EMAIL_URL: "smtp://mailhog:1025"
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
celerybeat:
environment:
DD_DATABASE_URL: ${DD_TEST_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo}
celeryworker:
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432}', '-t', '30', '--', '/entrypoint-celery-worker-dev.sh']
environment:
DD_DATABASE_URL: ${DD_TEST_DATABASE_URL:-postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo}
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
initializer:
environment:
PYTHONWARNINGS: error # We are strict about Warnings during testing
Expand Down
1 change: 1 addition & 0 deletions docker-compose.override.unit_tests_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
DD_CELERY_BROKER_PARAMS: ''
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
DD_V3_FEATURE_LOCATIONS: ${DD_V3_FEATURE_LOCATIONS:-False}
celerybeat: !reset
celeryworker: !reset
initializer: !reset
Expand Down
Loading