Skip to content

Commit e05c317

Browse files
authored
CDRIVER-4150 fix the AWS ECS test tasks (#1073)
* Use a Python virtual environment with upgraded boto3. * Use separate client in shell auth. * remove duplicate errexit
1 parent 851c7f0 commit e05c317

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,12 +757,12 @@ functions:
757757
working_dir: mongoc
758758
shell: bash
759759
script: |-
760-
set -o errexit
761760
set -o errexit
762761
# Export the variables we need to construct URIs
763762
set +o xtrace
764763
export IAM_AUTH_ECS_ACCOUNT=${iam_auth_ecs_account}
765764
export IAM_AUTH_ECS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key}
765+
. ../drivers-evergreen-tools/.evergreen/auth_aws/activate_venv.sh
766766
sh ./.evergreen/run-aws-tests.sh ${TESTCASE}
767767
clone drivers-evergreen-tools:
768768
- command: shell.exec

.evergreen/ecs_hosted_test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ TestData = {};
3333
const smoke = runMongoProgram(program, uri);
3434
assert.eq(smoke, 0, "Could not auth");
3535

36-
// Try the auth function
37-
assert(external.auth({mechanism: 'MONGODB-AWS'}));
36+
// Try the auth function on a new client.
37+
(function () {
38+
const conn = Mongo("mongodb://127.0.0.1:20000");
39+
const external = conn.getDB("$external");
40+
assert(external.auth({mechanism: 'MONGODB-AWS'}));
41+
}());
3842

3943
MongoRunner.stopMongod(conn);
4044
}());

build/evergreen_config_lib/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,11 @@
547547
EOF
548548
''', silent=True),
549549
shell_mongoc(r'''
550-
set -o errexit
551550
# Export the variables we need to construct URIs
552551
set +o xtrace
553552
export IAM_AUTH_ECS_ACCOUNT=${iam_auth_ecs_account}
554553
export IAM_AUTH_ECS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key}
554+
. ../drivers-evergreen-tools/.evergreen/auth_aws/activate_venv.sh
555555
sh ./.evergreen/run-aws-tests.sh ${TESTCASE}
556556
''')
557557
)),

0 commit comments

Comments
 (0)