@@ -675,9 +675,10 @@ functions:
675
675
shell : bash
676
676
script : |
677
677
${PREPARE_SHELL}
678
+ set -ex
678
679
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
679
680
. ./activate-authawsvenv.sh
680
- ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
681
+ python aws_tester.py regular
681
682
- command : shell.exec
682
683
type : test
683
684
params :
@@ -706,9 +707,10 @@ functions:
706
707
shell : bash
707
708
script : |
708
709
${PREPARE_SHELL}
710
+ set -ex
709
711
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
710
712
. ./activate-authawsvenv.sh
711
- ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
713
+ python aws_tester.py assume-role
712
714
- command : shell.exec
713
715
type : test
714
716
params :
@@ -744,9 +746,10 @@ functions:
744
746
# Write an empty prepare_mongodb_aws so no auth environment variables
745
747
# are set.
746
748
echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
749
+ set -ex
747
750
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
748
751
. ./activate-authawsvenv.sh
749
- ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
752
+ python aws_tester.py ec2
750
753
- command : shell.exec
751
754
type : test
752
755
params :
@@ -762,9 +765,12 @@ functions:
762
765
params :
763
766
working_dir : " src"
764
767
silent : true
768
+ shell : bash
765
769
script : |
770
+ set -ex
766
771
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
768
774
cd -
769
775
cat <<EOF > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
770
776
export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account}
@@ -785,9 +791,12 @@ functions:
785
791
params :
786
792
working_dir : " src"
787
793
silent : true
794
+ shell : bash
788
795
script : |
796
+ set -ex
789
797
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
791
800
cd -
792
801
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
793
802
export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
@@ -809,10 +818,12 @@ functions:
809
818
params :
810
819
working_dir : " src"
811
820
silent : true
821
+ shell : bash
812
822
script : |
823
+ set -ex
813
824
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
816
827
cd -
817
828
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
818
829
export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -834,10 +845,12 @@ functions:
834
845
params :
835
846
working_dir : " src"
836
847
silent : true
848
+ shell : bash
837
849
script : |
850
+ set -ex
838
851
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
841
854
cd -
842
855
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
843
856
export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -864,22 +877,19 @@ functions:
864
877
ECS_SRC_DIR=$AUTH_AWS_DIR/src
865
878
866
879
# 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
868
881
869
882
# pack up project directory to ssh it to the container
870
883
mkdir -p $ECS_SRC_DIR/.evergreen
871
884
cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
872
885
tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
873
886
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
881
889
. ./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
883
893
884
894
" run-ocsp-test " :
885
895
- command : shell.exec
0 commit comments