Skip to content

Commit 276508a

Browse files
committed
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 aa12c48 commit 276508a

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
@@ -752,12 +752,12 @@ functions:
752752
working_dir: mongoc
753753
shell: bash
754754
script: |-
755-
set -o errexit
756755
set -o errexit
757756
# Export the variables we need to construct URIs
758757
set +o xtrace
759758
export IAM_AUTH_ECS_ACCOUNT=${iam_auth_ecs_account}
760759
export IAM_AUTH_ECS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key}
760+
. ../drivers-evergreen-tools/.evergreen/auth_aws/activate_venv.sh
761761
sh ./.evergreen/run-aws-tests.sh ${TESTCASE}
762762
clone drivers-evergreen-tools:
763763
- 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
@@ -542,11 +542,11 @@
542542
EOF
543543
''', silent=True),
544544
shell_mongoc(r'''
545-
set -o errexit
546545
# Export the variables we need to construct URIs
547546
set +o xtrace
548547
export IAM_AUTH_ECS_ACCOUNT=${iam_auth_ecs_account}
549548
export IAM_AUTH_ECS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key}
549+
. ../drivers-evergreen-tools/.evergreen/auth_aws/activate_venv.sh
550550
sh ./.evergreen/run-aws-tests.sh ${TESTCASE}
551551
''')
552552
)),

0 commit comments

Comments
 (0)