-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Why?** The tests that execute in the aws-deployment-framework-bootstrap pipeline failed. They failed, as the tests picked up environment variables from the actual ADF installation. Rather than the test environment they run in normally. **What?** Fixed by running the tests using tox. Such that the test environment is created. This ensure the tests are consistent regardless of where they execute.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/lambda_codebase/initial_commit/bootstrap_repository/requirements-dev.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tox==4.11.4 |
40 changes: 40 additions & 0 deletions
40
src/lambda_codebase/initial_commit/bootstrap_repository/tox.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# tox (https://tox.readthedocs.io/) is a tool for running tests | ||
# in multiple virtualenvs. This configuration file will run the | ||
# test suite on all supported python versions. To use it, "pip install tox" | ||
# and then run "tox" from this directory. | ||
|
||
[tox] | ||
envlist = py312 | ||
skipsdist = True | ||
|
||
|
||
[testenv] | ||
setenv= | ||
PYTHONPATH={toxinidir}/adf-build/shared/python | ||
ORGANIZATION_ID=o-123456789 | ||
AWS_REGION=eu-central-1 | ||
AWS_DEFAULT_REGION=eu-central-1 | ||
ADF_PIPELINE_PREFIX=adf-pipeline- | ||
CODEBUILD_BUILD_ID=abcdef | ||
S3_BUCKET=some_bucket | ||
S3_BUCKET_NAME=some_bucket | ||
DEPLOYMENT_ACCOUNT_BUCKET=some_deployment_account_bucket | ||
MASTER_ACCOUNT_ID=123 | ||
ADF_VERSION=1.0.0 | ||
ADF_LOG_LEVEL=CRITICAL | ||
ADF_PROJECT_NAME=whatever | ||
ACCOUNT_ID=111111111111 | ||
|
||
allowlist_externals = | ||
pytest | ||
# python | ||
deps = | ||
-r{toxinidir}/adf-build/requirements.txt | ||
-r{toxinidir}/adf-build/requirements-dev.txt | ||
-r{toxinidir}/adf-build/shared/helpers/requirements.txt | ||
-r{toxinidir}/adf-build/shared/helpers/requirements-dev.txt | ||
-r{toxinidir}/adf-build/shared/requirements.txt | ||
-r{toxinidir}/adf-build/shared/requirements-dev.txt | ||
|
||
commands = | ||
pytest -vvv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters