Skip to content

Commit 34fb128

Browse files
committed
Set AWS_ROLE_ARN
More AWS cred testing More AWS cred testing More AWS cred testing testing testing More cleanup Debugging Debugging again deubg 3.7 deubg 3.7 Security cleanup
1 parent e2286cc commit 34fb128

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.evergreen/config.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ functions:
545545
546546
set -o errexit
547547
set -o xtrace
548+
549+
source ./secrets-export.sh
548550
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m test-atlas
549551
550552
"add aws auth variables to file":
@@ -774,18 +776,31 @@ functions:
774776
- command: ec2.assume_role
775777
params:
776778
role_arn: ${aws_test_secrets_role}
779+
- command: shell.exec
780+
type: test
781+
params:
782+
working_dir: "src"
783+
silent: true
784+
script: |
785+
# DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does)
786+
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
787+
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
788+
export AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
777789
- command: shell.exec
778790
type: test
779791
params:
780792
working_dir: "src"
781793
shell: bash
782794
script: |
783795
${PREPARE_SHELL}
784-
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m aws-secrets
796+
797+
# This is required for pypy3.7 UTF encoding
798+
export LC_ALL=en_US.UTF-8
799+
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m aws-secrets -- drivers/test
785800
786801
- command: expansions.update
787802
params:
788-
file: secrets-expansion.yml
803+
file: src/secrets-expansion.yml
789804

790805
"run oidc auth test with aws credentials":
791806
- command: shell.exec

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ commands =
148148
deps =
149149
pytest>=7
150150
passenv = *
151-
allowlist_externals =
152-
bash
153151
commands =
154-
bash -c 'source ./secrets-export.sh; python -m pytest -v {posargs} ./test/atlas/test_connection.py'
152+
python -m pytest -v {posargs} ./test/atlas/test_connection.py
155153

156154
[testenv:test-mockupdb]
157155
description = run mockupdb tests
@@ -170,7 +168,7 @@ passenv = *
170168
allowlist_externals =
171169
bash
172170
commands =
173-
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py drivers/test
171+
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py {posargs}
174172

175173
[testenv:test-aws-secrets]
176174
deps =

0 commit comments

Comments
 (0)