@@ -669,9 +669,10 @@ functions:
669
669
shell : bash
670
670
script : |
671
671
${PREPARE_SHELL}
672
+ set -ex
672
673
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
673
674
. ./activate-authawsvenv.sh
674
- ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
675
+ python aws_tester.py regular
675
676
- command : shell.exec
676
677
type : test
677
678
params :
@@ -700,9 +701,10 @@ functions:
700
701
shell : bash
701
702
script : |
702
703
${PREPARE_SHELL}
704
+ set -ex
703
705
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
704
706
. ./activate-authawsvenv.sh
705
- ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
707
+ python aws_tester.py assume-role
706
708
- command : shell.exec
707
709
type : test
708
710
params :
@@ -738,9 +740,10 @@ functions:
738
740
# Write an empty prepare_mongodb_aws so no auth environment variables
739
741
# are set.
740
742
echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
743
+ set -ex
741
744
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
742
745
. ./activate-authawsvenv.sh
743
- ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
746
+ python aws_tester.py ec2
744
747
- command : shell.exec
745
748
type : test
746
749
params :
@@ -756,9 +759,12 @@ functions:
756
759
params :
757
760
working_dir : " src"
758
761
silent : true
762
+ shell : bash
759
763
script : |
764
+ set -ex
760
765
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
762
768
cd -
763
769
cat <<EOF > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
764
770
export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account}
@@ -779,9 +785,12 @@ functions:
779
785
params :
780
786
working_dir : " src"
781
787
silent : true
788
+ shell : bash
782
789
script : |
790
+ set -ex
783
791
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
785
794
cd -
786
795
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
787
796
export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json)
@@ -803,10 +812,12 @@ functions:
803
812
params :
804
813
working_dir : " src"
805
814
silent : true
815
+ shell : bash
806
816
script : |
817
+ set -ex
807
818
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
810
821
cd -
811
822
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
812
823
export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -828,10 +839,12 @@ functions:
828
839
params :
829
840
working_dir : " src"
830
841
silent : true
842
+ shell : bash
831
843
script : |
844
+ set -ex
832
845
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
835
848
cd -
836
849
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
837
850
export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
@@ -858,22 +871,19 @@ functions:
858
871
ECS_SRC_DIR=$AUTH_AWS_DIR/src
859
872
860
873
# 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
862
875
863
876
# pack up project directory to ssh it to the container
864
877
mkdir -p $ECS_SRC_DIR/.evergreen
865
878
cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
866
879
tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
867
880
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
875
883
. ./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
877
887
878
888
" run-ocsp-test " :
879
889
- command : shell.exec
0 commit comments