Skip to content

Commit 9f945c4

Browse files
authored
test(NODE-4800): update build env scripts (#3487)
1 parent 6ef11d7 commit 9f945c4

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

.evergreen/config.in.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,21 +527,23 @@ functions:
527527
type: test
528528
params:
529529
working_dir: "src"
530+
shell: bash
530531
script: |
531532
${PREPARE_SHELL}
532533
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
533-
. ./activate_venv.sh
534+
. ./activate-authawsvenv.sh
534535
cd -
535536
536537
"run aws auth test with regular aws credentials":
537538
- command: shell.exec
538539
type: test
539540
params:
540541
working_dir: "src"
542+
shell: bash
541543
script: |
542544
${PREPARE_SHELL}
543545
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
544-
. ./activate_venv.sh
546+
. ./activate-authawsvenv.sh
545547
${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
546548
- command: shell.exec
547549
type: test
@@ -568,10 +570,11 @@ functions:
568570
type: test
569571
params:
570572
working_dir: "src"
573+
shell: bash
571574
script: |
572575
${PREPARE_SHELL}
573576
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
574-
. ./activate_venv.sh
577+
. ./activate-authawsvenv.sh
575578
${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
576579
- command: shell.exec
577580
type: test
@@ -602,13 +605,14 @@ functions:
602605
type: test
603606
params:
604607
working_dir: "src"
608+
shell: bash
605609
script: |
606610
${PREPARE_SHELL}
607611
# Write an empty prepare_mongodb_aws so no auth environment variables
608612
# are set.
609613
echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
610614
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
611-
. ./activate_venv.sh
615+
. ./activate-authawsvenv.sh
612616
${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
613617
- command: shell.exec
614618
type: test
@@ -671,6 +675,7 @@ functions:
671675
type: test
672676
params:
673677
working_dir: src
678+
shell: bash
674679
script: |
675680
${PREPARE_SHELL}
676681
AUTH_AWS_DIR=${DRIVERS_TOOLS}/.evergreen/auth_aws
@@ -691,7 +696,7 @@ functions:
691696
EOF
692697
693698
cat setup.js
694-
. ./activate_venv.sh
699+
. ./activate-authawsvenv.sh
695700
${MONGODB_BINARIES}/mongo --nodb setup.js aws_e2e_ecs.js
696701
697702
"run-ocsp-test":

.evergreen/config.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,20 +490,22 @@ functions:
490490
type: test
491491
params:
492492
working_dir: src
493+
shell: bash
493494
script: |
494495
${PREPARE_SHELL}
495496
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
496-
. ./activate_venv.sh
497+
. ./activate-authawsvenv.sh
497498
cd -
498499
run aws auth test with regular aws credentials:
499500
- command: shell.exec
500501
type: test
501502
params:
502503
working_dir: src
504+
shell: bash
503505
script: |
504506
${PREPARE_SHELL}
505507
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
506-
. ./activate_venv.sh
508+
. ./activate-authawsvenv.sh
507509
${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
508510
- command: shell.exec
509511
type: test
@@ -529,10 +531,11 @@ functions:
529531
type: test
530532
params:
531533
working_dir: src
534+
shell: bash
532535
script: |
533536
${PREPARE_SHELL}
534537
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
535-
. ./activate_venv.sh
538+
. ./activate-authawsvenv.sh
536539
${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js
537540
- command: shell.exec
538541
type: test
@@ -562,13 +565,14 @@ functions:
562565
type: test
563566
params:
564567
working_dir: src
568+
shell: bash
565569
script: |
566570
${PREPARE_SHELL}
567571
# Write an empty prepare_mongodb_aws so no auth environment variables
568572
# are set.
569573
echo "" > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
570574
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
571-
. ./activate_venv.sh
575+
. ./activate-authawsvenv.sh
572576
${MONGODB_BINARIES}/mongo aws_e2e_ec2.js
573577
- command: shell.exec
574578
type: test
@@ -628,6 +632,7 @@ functions:
628632
type: test
629633
params:
630634
working_dir: src
635+
shell: bash
631636
script: |
632637
${PREPARE_SHELL}
633638
AUTH_AWS_DIR=${DRIVERS_TOOLS}/.evergreen/auth_aws
@@ -648,7 +653,7 @@ functions:
648653
EOF
649654
650655
cat setup.js
651-
. ./activate_venv.sh
656+
. ./activate-authawsvenv.sh
652657
${MONGODB_BINARIES}/mongo --nodb setup.js aws_e2e_ecs.js
653658
run-ocsp-test:
654659
- command: shell.exec

.evergreen/run-kms-servers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cd ${DRIVERS_TOOLS}/.evergreen/csfle
2-
. ./activate_venv.sh
2+
. ./activate-kmstlsvenv.sh
33
# by default it always runs on port 5698
44
./kmstlsvenv/bin/python3 -u kms_kmip_server.py &
55
./kmstlsvenv/bin/python3 -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000 &

test/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ The following steps will walk you through how to run the tests for CSFLE.
422422
#### KMIP FLE support tests
423423

424424
1. Install virtualenv: `pip install virtualenv`
425-
2. Source the ./activate_venv.sh script in driver evergreen tools `.evergreen/csfle/activate_venv.sh`
425+
2. Source the ./activate-kmstlsvenv.sh script in driver evergreen tools `.evergreen/csfle/activate-kmstlsvenv.sh`
426426
1. This will install all the dependencies needed to run a python kms_kmip simulated server
427427
3. In 4 separate terminals launch the following:
428428
- `./kmstlsvenv/bin/python3 -u kms_kmip_server.py` # by default it always runs on port 5698

test/spec/client-side-encryption/tests/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,14 +1193,14 @@ KMS TLS Tests
11931193
The following tests that connections to KMS servers with TLS verify peer certificates.
11941194

11951195
The two tests below make use of mock KMS servers which can be run on Evergreen using `the mock KMS server script <https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/csfle/kms_http_server.py>`_.
1196-
Drivers can set up their local Python enviroment for the mock KMS server by running `the virtualenv activation script <https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/csfle/activate_venv.sh>`_.
1196+
Drivers can set up their local Python enviroment for the mock KMS server by running `the virtualenv activation script <https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/csfle/activate-kmstlsvenv.sh>`_.
11971197

11981198
To start two mock KMS servers, one on port 9000 with `ca.pem`_ as a CA file and `expired.pem`_ as a cert file, and one on port 9001 with `ca.pem`_ as a CA file and `wrong-host.pem`_ as a cert file,
11991199
run the following commands from the ``.evergreen/csfle`` directory:
12001200

12011201
.. code::
12021202
1203-
. ./activate_venv.sh
1203+
. ./activate-kmstlsvenv.sh
12041204
python -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 9000 &
12051205
python -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/wrong-host.pem --port 9001 &
12061206

0 commit comments

Comments
 (0)