Skip to content

Commit 86b1035

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 a3123e4 commit 86b1035

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.evergreen/config.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ functions:
541541
542542
set -o errexit
543543
set -o xtrace
544+
source ./secrets-export.sh
544545
# This is required for pypy3.7 UTF encoding
545546
export LC_ALL=en_US.UTF-8
546547
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m test-atlas
@@ -772,18 +773,31 @@ functions:
772773
- command: ec2.assume_role
773774
params:
774775
role_arn: ${aws_test_secrets_role}
776+
- command: shell.exec
777+
type: test
778+
params:
779+
working_dir: "src"
780+
silent: true
781+
script: |
782+
# DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does)
783+
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
784+
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
785+
export AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
775786
- command: shell.exec
776787
type: test
777788
params:
778789
working_dir: "src"
779790
shell: bash
780791
script: |
781792
${PREPARE_SHELL}
782-
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m aws-secrets
793+
794+
# This is required for pypy3.7 UTF encoding
795+
export LC_ALL=en_US.UTF-8
796+
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m aws-secrets -- drivers/test
783797
784798
- command: expansions.update
785799
params:
786-
file: secrets-expansion.yml
800+
file: src/secrets-expansion.yml
787801

788802
"run oidc auth test with aws credentials":
789803
- command: shell.exec

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ commands =
144144
deps =
145145
pytest>=7
146146
passenv = *
147-
allowlist_externals =
148-
bash
149147
commands =
150-
bash -c 'source ./secrets-export.sh; python -m pytest -v {posargs} ./test/atlas/test_connection.py'
148+
python -m pytest -v {posargs} ./test/atlas/test_connection.py
151149

152150
[testenv:test-mockupdb]
153151
description = run mockupdb tests
@@ -166,7 +164,7 @@ passenv = *
166164
allowlist_externals =
167165
bash
168166
commands =
169-
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py drivers/test
167+
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py {posargs}
170168

171169
[testenv:test-aws-secrets]
172170
deps =

0 commit comments

Comments
 (0)