@@ -669,9 +669,10 @@ functions:
669669 shell : bash
670670 script : |
671671 ${PREPARE_SHELL}
672+ set -ex
672673 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
673674 . ./activate-authawsvenv.sh
674- ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
675+ python aws_tester.py regular
675676 - command : shell.exec
676677 type : test
677678 params :
@@ -700,9 +701,10 @@ functions:
700701 shell : bash
701702 script : |
702703 ${PREPARE_SHELL}
704+ set -ex
703705 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
704706 . ./activate-authawsvenv.sh
705- ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
707+ python aws_tester.py assume-role
706708 - command : shell.exec
707709 type : test
708710 params :
@@ -738,9 +740,10 @@ functions:
738740 # Write an empty prepare_mongodb_aws so no auth environment variables
739741 # are set.
740742 echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
743+ set -ex
741744 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
742745 . ./activate-authawsvenv.sh
743- ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
746+ python aws_tester.py ec2
744747 - command : shell.exec
745748 type : test
746749 params :
@@ -756,9 +759,12 @@ functions:
756759 params :
757760 working_dir : " src"
758761 silent : true
762+ shell : bash
759763 script : |
764+ set -ex
760765 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
761- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_regular_aws.js
766+ . ./activate-authawsvenv.sh
767+ python aws_tester.py regular
762768 cd -
763769 cat <<EOF > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
764770 export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account}
@@ -779,9 +785,12 @@ functions:
779785 params :
780786 working_dir : " src"
781787 silent : true
788+ shell : bash
782789 script : |
790+ set -ex
783791 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
784- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_assume_role.js
792+ . ./activate-authawsvenv.sh
793+ python aws_tester.py assume-role
785794 cd -
786795 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
787796 export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
@@ -803,10 +812,12 @@ functions:
803812 params :
804813 working_dir : " src"
805814 silent : true
815+ shell : bash
806816 script : |
817+ set -ex
807818 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
808- . ./activate_venv .sh
809- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
819+ . ./activate-authawsvenv .sh
820+ python aws_tester.py web-identity
810821 cd -
811822 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
812823 export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -828,10 +839,12 @@ functions:
828839 params :
829840 working_dir : " src"
830841 silent : true
842+ shell : bash
831843 script : |
844+ set -ex
832845 cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
833- . ./activate_venv .sh
834- ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
846+ . ./activate-authawsvenv .sh
847+ python aws_tester.py web-identity
835848 cd -
836849 cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
837850 export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -858,22 +871,19 @@ functions:
858871 ECS_SRC_DIR=$AUTH_AWS_DIR/src
859872
860873 # fix issue with `TestData` in SERVER-46340
861- sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js
874+ # sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js
862875
863876 # pack up project directory to ssh it to the container
864877 mkdir -p $ECS_SRC_DIR/.evergreen
865878 cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
866879 tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
867880
868- cd $AUTH_AWS_DIR
869- cat <<EOF > setup.js
870- const mongo_binaries = "$MONGODB_BINARIES";
871- const project_dir = "$ECS_SRC_DIR";
872- EOF
873-
874- cat setup.js
881+ set -ex
882+ cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
875883 . ./activate-authawsvenv.sh
876- ${MONGODB_BINARIES}/mongo --nodb setup.js aws_e2e_ecs.js
884+ export MONGODB_BINARIES="${MONGODB_BINARIES}";
885+ export PROJECT_DIRECTORY=$ECS_SRC_DIR;
886+ python aws_tester.py ecs
877887
878888 " run-ocsp-test " :
879889 - command : shell.exec
0 commit comments