File tree Expand file tree Collapse file tree 3 files changed +20
-48
lines changed Expand file tree Collapse file tree 3 files changed +20
-48
lines changed Original file line number Diff line number Diff line change @@ -776,16 +776,19 @@ functions:
776
776
- command : ec2.assume_role
777
777
params :
778
778
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}
779
+ add_expansions_to_env : true
780
+ # - command: shell.exec
781
+ # type: test
782
+ # params:
783
+ # working_dir: "src"
784
+ # silent: true
785
+ # script: |
786
+ # # DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does)
787
+ # cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_aws_connection.sh"
788
+ # export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
789
+ # export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
790
+ # export AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
791
+ # EOF
789
792
- command : shell.exec
790
793
type : test
791
794
params :
Original file line number Diff line number Diff line change 48
48
# show test output
49
49
set -x
50
50
51
- # Workaround macOS python 3.9 incompatibility with system virtualenv.
52
- # if [ "$(uname -s)" = "Darwin" ]; then
53
- # VIRTUALENV="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m virtualenv"
54
- # else
51
+ Workaround macOS python 3.9 incompatibility with system virtualenv.
52
+ if [ " $( uname -s) " = " Darwin" ]; then
53
+ VIRTUALENV=" /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m virtualenv"
54
+ else
55
55
VIRTUALENV=$( command -v virtualenv)
56
- # fi
56
+ fi
57
57
58
58
authtest () {
59
59
if [ " Windows_NT" = " $OS " ]; then
@@ -71,7 +71,7 @@ authtest () {
71
71
fi
72
72
python -m pip install -U pip setuptools
73
73
python -m pip install ' .[aws]'
74
- pytest -v test/auth_aws/test_auth_oidc.py
74
+ python test/auth_aws/test_auth_oidc.py -v
75
75
deactivate
76
76
rm -rf venvoidc
77
77
}
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ commands =
146
146
147
147
[testenv:test-atlas]
148
148
deps =
149
- pytest>=7
149
+ {[testenv:test]deps}
150
150
passenv = *
151
151
commands =
152
152
python -m pytest -v {posargs} ./test/atlas/test_connection.py
@@ -169,34 +169,3 @@ allowlist_externals =
169
169
bash
170
170
commands =
171
171
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py {posargs}
172
-
173
- [testenv:test-aws-secrets]
174
- deps =
175
- PyYAML
176
- boto3
177
- pyjwkest
178
- pyop~=3.4.0
179
- azure-identity
180
- azure-keyvault-secrets
181
- pytest
182
- passenv = *
183
- setenv =
184
- OIDC_TOKEN_DIR =/tmp/tokens
185
- PYTHON_BINARY =python
186
- MONGODB_URI =mongodb+srv://oidc-rapid.oztdp.mongodb-dev.net
187
- MONGODB_URI_SINGLE =" mongodb+srv://oidc-rapid.oztdp.mongodb-dev.net/?authMechanism=MONGODB-OIDC"
188
- MONGODB_URI_MULTIPLE =" mongodb+srv://oidc-rapid.oztdp.mongodb-dev.net:27018/?authMechanism=MONGODB-OIDC&directConnection=true"
189
- allowlist_externals =
190
- bash
191
- source
192
- echo
193
- commands =
194
- ; git clone -b DRIVERS-2585 https://github.com/NoahStapp/drivers-evergreen-tools.git
195
- python ./drivers-evergreen-tools/.evergreen/auth_aws/setup_secrets.py drivers/test
196
- bash ./secrets-export.sh
197
-
198
- bash ./drivers-evergreen-tools/.evergreen/auth_oidc/activate-authoidcvenv.sh
199
- python ./drivers-evergreen-tools/.evergreen/auth_oidc/oidc_write_orchestration.py
200
- python ./drivers-evergreen-tools/.evergreen/auth_oidc/oidc_get_tokens.py
201
-
202
- bash .evergreen/run-mongodb-oidc-test.sh
You can’t perform that action at this time.
0 commit comments