@@ -675,9 +675,10 @@ functions:
675675 shell : bash
676676 script : |
677677 ${PREPARE_SHELL}
678+ set -ex
678679 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
679680 . ./activate-authawsvenv.sh
680- ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
681+ python aws_tester.py regular
681682 - command : shell.exec
682683 type : test
683684 params :
@@ -706,9 +707,10 @@ functions:
706707 shell : bash
707708 script : |
708709 ${PREPARE_SHELL}
710+ set -ex
709711 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
710712 . ./activate-authawsvenv.sh
711- ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
713+ python aws_tester.py assume-role
712714 - command : shell.exec
713715 type : test
714716 params :
@@ -744,9 +746,10 @@ functions:
744746 # Write an empty prepare_mongodb_aws so no auth environment variables
745747 # are set.
746748 echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
749+ set -ex
747750 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
748751 . ./activate-authawsvenv.sh
749- ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
752+ python aws_tester.py ec2
750753 - command : shell.exec
751754 type : test
752755 params :
@@ -762,9 +765,12 @@ functions:
762765 params :
763766 working_dir : " src"
764767 silent : true
768+ shell : bash
765769 script : |
770+ set -ex
766771 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
767- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_regular_aws.js
772+ . ./activate-authawsvenv.sh
773+ python aws_tester.py regular
768774 cd -
769775 cat <<EOF > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
770776 export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account}
@@ -785,9 +791,12 @@ functions:
785791 params :
786792 working_dir : " src"
787793 silent : true
794+ shell : bash
788795 script : |
796+ set -ex
789797 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
790- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_assume_role.js
798+ . ./activate-authawsvenv.sh
799+ python aws_tester.py assume-role
791800 cd -
792801 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
793802 export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
@@ -809,10 +818,12 @@ functions:
809818 params :
810819 working_dir : " src"
811820 silent : true
821+ shell : bash
812822 script : |
823+ set -ex
813824 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
814- . ./activate_venv .sh
815- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
825+ . ./activate-authawsvenv .sh
826+ python aws_tester.py web-identity
816827 cd -
817828 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
818829 export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -834,10 +845,12 @@ functions:
834845 params :
835846 working_dir : " src"
836847 silent : true
848+ shell : bash
837849 script : |
850+ set -ex
838851 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
839- . ./activate_venv .sh
840- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
852+ . ./activate-authawsvenv .sh
853+ python aws_tester.py web-identity
841854 cd -
842855 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
843856 export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -864,22 +877,19 @@ functions:
864877 ECS_SRC_DIR=$AUTH_AWS_DIR/src
865878
866879 # fix issue with `TestData` in SERVER-46340
867- sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js
880+ # sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js
868881
869882 # pack up project directory to ssh it to the container
870883 mkdir -p $ECS_SRC_DIR/.evergreen
871884 cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
872885 tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
873886
874- cd $AUTH_AWS_DIR
875- cat <<EOF > setup.js
876- const mongo_binaries = "$MONGODB_BINARIES";
877- const project_dir = "$ECS_SRC_DIR";
878- EOF
879-
880- cat setup.js
887+ set -ex
888+ cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
881889 . ./activate-authawsvenv.sh
882- ${MONGODB_BINARIES}/mongo --nodb setup.js aws_e2e_ecs.js
890+ export MONGODB_BINARIES="${MONGODB_BINARIES}";
891+ export PROJECT_DIRECTORY=$ECS_SRC_DIR;
892+ python aws_tester.py ecs
883893
884894 " run-ocsp-test " :
885895 - command : shell.exec
0 commit comments