Skip to content

Commit c3069fe

Browse files
committed
Test on EG with atlas-tests
Test again Use correct DET Use tox properly Correct utils.sh path debug prepare shell Use correct working dir
1 parent f6323f6 commit c3069fe

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

.evergreen/config.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ functions:
9898
# If this was a patch build, doing a fresh clone would not actually test the patch
9999
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
100100
else
101-
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
101+
git clone -b DRIVERS-2585 https://github.com/NoahStapp/drivers-evergreen-tools.git $DRIVERS_TOOLS
102102
fi
103103
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
104104
@@ -534,40 +534,18 @@ functions:
534534
PYTHON_BINARY=${PYTHON_BINARY} PROJECT_DIRECTORY=${PROJECT_DIRECTORY} bash ${PROJECT_DIRECTORY}/.evergreen/run-enterprise-auth-tests.sh
535535
536536
"run atlas tests":
537-
- command: shell.exec
538-
type: test
539-
params:
540-
silent: true
541-
working_dir: "src"
542-
script: |
543-
cat <<EOT > prepare_atlas_connectivity.sh
544-
export ATLAS_FREE='${atlas_free}'
545-
export ATLAS_REPL='${atlas_repl}'
546-
export ATLAS_SHRD='${atlas_shrd}'
547-
export ATLAS_TLS11='${atlas_tls11}'
548-
export ATLAS_TLS12='${atlas_tls12}'
549-
export ATLAS_SERVERLESS='${atlas_serverless}'
550-
export ATLAS_SRV_FREE='${atlas_srv_free}'
551-
export ATLAS_SRV_REPL='${atlas_srv_repl}'
552-
export ATLAS_SRV_SHRD='${atlas_srv_shrd}'
553-
export ATLAS_SRV_TLS11='${atlas_srv_tls11}'
554-
export ATLAS_SRV_TLS12='${atlas_srv_tls12}'
555-
export ATLAS_SRV_SERVERLESS='${atlas_srv_serverless}'
556-
EOT
557537
- command: shell.exec
558538
type: test
559539
params:
560540
working_dir: "src"
561541
script: |
542+
${PREPARE_SHELL}
562543
# Disable xtrace for security reasons (just in case it was accidentally set).
563544
set +x
564545
565-
. ./prepare_atlas_connectivity.sh
566-
rm -f ./prepare_atlas_connectivity.sh
567-
568546
set -o errexit
569547
set -o xtrace
570-
${PYTHON_BINARY} -m tox -m test-atlas
548+
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m test-atlas
571549
572550
"add aws auth variables to file":
573551
- command: shell.exec
@@ -799,22 +777,16 @@ functions:
799777
- command: shell.exec
800778
type: test
801779
params:
780+
working_dir: "src"
802781
shell: bash
803782
script: |
804783
${PREPARE_SHELL}
805-
if [ "${skip_EC2_auth_test}" = "true" ]; then
806-
echo "This platform does not support aws secrets, skipping..."
807-
exit 0
808-
fi
809-
810-
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
811-
python setup_secrets.py
784+
bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh ${PYTHON_BINARY} -m aws-secrets
812785
813786
- command: expansions.update
814787
params:
815788
file: secrets-expansion.yml
816789

817-
818790
"run oidc auth test with aws credentials":
819791
- command: shell.exec
820792
type: test
@@ -1739,6 +1711,7 @@ tasks:
17391711
- name: "atlas-connect"
17401712
tags: ["atlas-connect"]
17411713
commands:
1714+
- func: "bootstrap aws-secrets"
17421715
- func: "run atlas tests"
17431716

17441717
- name: atlas-data-lake-tests

tox.ini

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,11 @@ commands =
145145

146146
[testenv:test-atlas]
147147
deps =
148-
PyYAML
149-
boto3
150148
pytest>=7
151149
passenv = *
152150
allowlist_externals =
153151
bash
154152
commands =
155-
bash -c 'git -C drivers-evergreen-tools pull origin DRIVERS-2585 || git clone -b DRIVERS-2585 https://github.com/NoahStapp/drivers-evergreen-tools.git'
156-
python ./drivers-evergreen-tools/.evergreen/auth_aws/setup_secrets.py drivers/test
157153
bash -c 'source ./secrets-export.sh; python -m pytest -v {posargs} ./test/atlas/test_connection.py'
158154

159155
[testenv:test-mockupdb]
@@ -165,6 +161,16 @@ passenv = *
165161
commands =
166162
python -m pytest -v {posargs} ./test/mockupdb
167163

164+
[testenv:aws-secrets]
165+
deps =
166+
PyYAML
167+
boto3
168+
passenv = *
169+
allowlist_externals =
170+
bash
171+
commands =
172+
python {env:DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py drivers/test
173+
168174
[testenv:test-aws-secrets]
169175
deps =
170176
PyYAML

0 commit comments

Comments
 (0)