Skip to content

Commit 206b664

Browse files
committed
PYTHON-5187 Add scripts to start and stop a server
1 parent 85b6f18 commit 206b664

File tree

10 files changed

+504
-479
lines changed

10 files changed

+504
-479
lines changed

.evergreen/config.yml

Lines changed: 40 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,16 @@ functions:
201201
params:
202202
file: "src/xunit-results/TEST-*.xml"
203203

204-
"bootstrap mongo-orchestration":
204+
"run-server":
205205
- command: subprocess.exec
206206
params:
207207
binary: bash
208-
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, LOAD_BALANCER,
209-
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED, AUTH_AWS]
210-
args:
211-
- src/.evergreen/scripts/bootstrap-mongo-orchestration.sh
208+
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
209+
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED]
210+
args: [.evergreen/just.sh, run-server, "${TEST_NAME}", "${SUB_TEST_NAME}"]
212211
- command: expansions.update
213212
params:
214-
file: mo-expansion.yml
213+
file: ${DRIVERS_TOOLS}/mo-expansion.yml
215214

216215
"bootstrap data lake":
217216
- command: subprocess.exec
@@ -227,13 +226,6 @@ functions:
227226
args:
228227
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
229228

230-
"stop mongo-orchestration":
231-
- command: subprocess.exec
232-
params:
233-
binary: bash
234-
args:
235-
- ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
236-
237229
"run mod_wsgi tests":
238230
- command: subprocess.exec
239231
type: test
@@ -423,7 +415,6 @@ post:
423415
- func: "upload coverage"
424416
- func: "upload mo artifacts"
425417
- func: "upload test results"
426-
- func: "stop mongo-orchestration"
427418
- func: "cleanup"
428419

429420
task_groups:
@@ -587,10 +578,7 @@ tasks:
587578
- name: "doctests"
588579
tags: ["doctests"]
589580
commands:
590-
- func: "bootstrap mongo-orchestration"
591-
vars:
592-
VERSION: "latest"
593-
TOPOLOGY: "server"
581+
- func: "run-server"
594582
- func: "run doctests"
595583

596584
- name: "test-serverless"
@@ -603,16 +591,13 @@ tasks:
603591
- name: "test-enterprise-auth"
604592
tags: ["enterprise-auth"]
605593
commands:
606-
- func: "bootstrap mongo-orchestration"
607-
vars:
608-
VERSION: "latest"
609-
TOPOLOGY: "server"
594+
- func: "run-server"
610595
- func: "assume ec2 role"
611596
- func: "run enterprise auth tests"
612597

613598
- name: "test-search-index-helpers"
614599
commands:
615-
- func: "bootstrap mongo-orchestration"
600+
- func: "run-server"
616601
vars:
617602
VERSION: "6.0"
618603
TOPOLOGY: "replica_set"
@@ -624,38 +609,32 @@ tasks:
624609
- name: "mod-wsgi-standalone"
625610
tags: ["mod_wsgi"]
626611
commands:
627-
- func: "bootstrap mongo-orchestration"
612+
- func: "run-server"
628613
vars:
629-
VERSION: "latest"
630614
TOPOLOGY: "server"
631615
- func: "run mod_wsgi tests"
632616

633617
- name: "mod-wsgi-replica-set"
634618
tags: ["mod_wsgi"]
635619
commands:
636-
- func: "bootstrap mongo-orchestration"
620+
- func: "run-server"
637621
vars:
638-
VERSION: "latest"
639622
TOPOLOGY: "replica_set"
640623
- func: "run mod_wsgi tests"
641624

642625
- name: "mod-wsgi-embedded-mode-standalone"
643626
tags: ["mod_wsgi"]
644627
commands:
645-
- func: "bootstrap mongo-orchestration"
646-
vars:
647-
VERSION: "latest"
648-
TOPOLOGY: "server"
628+
- func: "run-server"
649629
- func: "run mod_wsgi tests"
650630
vars:
651631
MOD_WSGI_EMBEDDED: "1"
652632

653633
- name: "mod-wsgi-embedded-mode-replica-set"
654634
tags: ["mod_wsgi"]
655635
commands:
656-
- func: "bootstrap mongo-orchestration"
636+
- func: "run-server"
657637
vars:
658-
VERSION: "latest"
659638
TOPOLOGY: "replica_set"
660639
- func: "run mod_wsgi tests"
661640
vars:
@@ -669,7 +648,7 @@ tasks:
669648
- name: "free-threading"
670649
tags: ["free-threading"]
671650
commands:
672-
- func: "bootstrap mongo-orchestration"
651+
- func: "run-server"
673652
vars:
674653
VERSION: "8.0"
675654
TOPOLOGY: "replica_set"
@@ -711,7 +690,7 @@ tasks:
711690
vars:
712691
OCSP_ALGORITHM: "rsa"
713692
SERVER_TYPE: "valid"
714-
- func: "bootstrap mongo-orchestration"
693+
- func: "run-server"
715694
vars:
716695
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json"
717696
- func: run-ocsp-test
@@ -726,7 +705,7 @@ tasks:
726705
vars:
727706
OCSP_ALGORITHM: "rsa"
728707
SERVER_TYPE: "revoked"
729-
- func: "bootstrap mongo-orchestration"
708+
- func: "run-server"
730709
vars:
731710
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json"
732711
- func: run-ocsp-test
@@ -741,7 +720,7 @@ tasks:
741720
vars:
742721
OCSP_ALGORITHM: "rsa"
743722
SERVER_TYPE: valid
744-
- func: "bootstrap mongo-orchestration"
723+
- func: "run-server"
745724
vars:
746725
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json"
747726
- func: run-ocsp-test
@@ -756,7 +735,7 @@ tasks:
756735
vars:
757736
OCSP_ALGORITHM: "rsa"
758737
SERVER_TYPE: revoked
759-
- func: "bootstrap mongo-orchestration"
738+
- func: "run-server"
760739
vars:
761740
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json"
762741
- func: run-ocsp-test
@@ -767,7 +746,7 @@ tasks:
767746
- name: test-ocsp-rsa-soft-fail
768747
tags: ["ocsp", "ocsp-rsa"]
769748
commands:
770-
- func: "bootstrap mongo-orchestration"
749+
- func: "run-server"
771750
vars:
772751
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json"
773752
- func: run-ocsp-test
@@ -782,7 +761,7 @@ tasks:
782761
vars:
783762
OCSP_ALGORITHM: "rsa"
784763
SERVER_TYPE: revoked
785-
- func: "bootstrap mongo-orchestration"
764+
- func: "run-server"
786765
vars:
787766
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple-disableStapling.json"
788767
- func: run-ocsp-test
@@ -793,7 +772,7 @@ tasks:
793772
- name: test-ocsp-rsa-malicious-no-responder-mustStaple-server-does-not-staple
794773
tags: ["ocsp", "ocsp-rsa"]
795774
commands:
796-
- func: "bootstrap mongo-orchestration"
775+
- func: "run-server"
797776
vars:
798777
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple-disableStapling.json"
799778
- func: run-ocsp-test
@@ -808,7 +787,7 @@ tasks:
808787
vars:
809788
OCSP_ALGORITHM: "rsa"
810789
SERVER_TYPE: valid-delegate
811-
- func: "bootstrap mongo-orchestration"
790+
- func: "run-server"
812791
vars:
813792
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json"
814793
- func: run-ocsp-test
@@ -823,7 +802,7 @@ tasks:
823802
vars:
824803
OCSP_ALGORITHM: "rsa"
825804
SERVER_TYPE: revoked-delegate
826-
- func: "bootstrap mongo-orchestration"
805+
- func: "run-server"
827806
vars:
828807
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json"
829808
- func: run-ocsp-test
@@ -838,7 +817,7 @@ tasks:
838817
vars:
839818
OCSP_ALGORITHM: "rsa"
840819
SERVER_TYPE: valid-delegate
841-
- func: "bootstrap mongo-orchestration"
820+
- func: "run-server"
842821
vars:
843822
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json"
844823
- func: run-ocsp-test
@@ -853,7 +832,7 @@ tasks:
853832
vars:
854833
OCSP_ALGORITHM: "rsa"
855834
SERVER_TYPE: revoked-delegate
856-
- func: "bootstrap mongo-orchestration"
835+
- func: "run-server"
857836
vars:
858837
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json"
859838
- func: run-ocsp-test
@@ -868,7 +847,7 @@ tasks:
868847
vars:
869848
OCSP_ALGORITHM: "rsa"
870849
SERVER_TYPE: revoked-delegate
871-
- func: "bootstrap mongo-orchestration"
850+
- func: "run-server"
872851
vars:
873852
ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple-disableStapling.json"
874853
- func: run-ocsp-test
@@ -883,7 +862,7 @@ tasks:
883862
vars:
884863
OCSP_ALGORITHM: "ecdsa"
885864
SERVER_TYPE: valid
886-
- func: "bootstrap mongo-orchestration"
865+
- func: "run-server"
887866
vars:
888867
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json"
889868
- func: run-ocsp-test
@@ -898,7 +877,7 @@ tasks:
898877
vars:
899878
OCSP_ALGORITHM: "ecdsa"
900879
SERVER_TYPE: revoked
901-
- func: "bootstrap mongo-orchestration"
880+
- func: "run-server"
902881
vars:
903882
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json"
904883
- func: run-ocsp-test
@@ -913,7 +892,7 @@ tasks:
913892
vars:
914893
OCSP_ALGORITHM: "ecdsa"
915894
SERVER_TYPE: valid
916-
- func: "bootstrap mongo-orchestration"
895+
- func: "run-server"
917896
vars:
918897
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json"
919898
- func: run-ocsp-test
@@ -928,7 +907,7 @@ tasks:
928907
vars:
929908
OCSP_ALGORITHM: "ecdsa"
930909
SERVER_TYPE: revoked
931-
- func: "bootstrap mongo-orchestration"
910+
- func: "run-server"
932911
vars:
933912
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json"
934913
- func: run-ocsp-test
@@ -939,7 +918,7 @@ tasks:
939918
- name: test-ocsp-ecdsa-soft-fail
940919
tags: ["ocsp", "ocsp-ecdsa"]
941920
commands:
942-
- func: "bootstrap mongo-orchestration"
921+
- func: "run-server"
943922
vars:
944923
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json"
945924
- func: run-ocsp-test
@@ -954,7 +933,7 @@ tasks:
954933
vars:
955934
OCSP_ALGORITHM: "ecdsa"
956935
SERVER_TYPE: revoked
957-
- func: "bootstrap mongo-orchestration"
936+
- func: "run-server"
958937
vars:
959938
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json"
960939
- func: run-ocsp-test
@@ -965,7 +944,7 @@ tasks:
965944
- name: test-ocsp-ecdsa-malicious-no-responder-mustStaple-server-does-not-staple
966945
tags: ["ocsp", "ocsp-ecdsa"]
967946
commands:
968-
- func: "bootstrap mongo-orchestration"
947+
- func: "run-server"
969948
vars:
970949
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json"
971950
- func: run-ocsp-test
@@ -980,7 +959,7 @@ tasks:
980959
vars:
981960
OCSP_ALGORITHM: "ecdsa"
982961
SERVER_TYPE: valid-delegate
983-
- func: "bootstrap mongo-orchestration"
962+
- func: "run-server"
984963
vars:
985964
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json"
986965
- func: run-ocsp-test
@@ -995,7 +974,7 @@ tasks:
995974
vars:
996975
OCSP_ALGORITHM: "ecdsa"
997976
SERVER_TYPE: revoked-delegate
998-
- func: "bootstrap mongo-orchestration"
977+
- func: "run-server"
999978
vars:
1000979
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json"
1001980
- func: run-ocsp-test
@@ -1010,7 +989,7 @@ tasks:
1010989
vars:
1011990
OCSP_ALGORITHM: "ecdsa"
1012991
SERVER_TYPE: valid-delegate
1013-
- func: "bootstrap mongo-orchestration"
992+
- func: "run-server"
1014993
vars:
1015994
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json"
1016995
- func: run-ocsp-test
@@ -1025,7 +1004,7 @@ tasks:
10251004
vars:
10261005
OCSP_ALGORITHM: "ecdsa"
10271006
SERVER_TYPE: revoked-delegate
1028-
- func: "bootstrap mongo-orchestration"
1007+
- func: "run-server"
10291008
vars:
10301009
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json"
10311010
- func: run-ocsp-test
@@ -1040,7 +1019,7 @@ tasks:
10401019
vars:
10411020
OCSP_ALGORITHM: "ecdsa"
10421021
SERVER_TYPE: valid-delegate
1043-
- func: "bootstrap mongo-orchestration"
1022+
- func: "run-server"
10441023
vars:
10451024
ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json"
10461025
- func: run-ocsp-test
@@ -1115,21 +1094,19 @@ tasks:
11151094
- name: "perf-6.0-standalone"
11161095
tags: ["perf"]
11171096
commands:
1118-
- func: "bootstrap mongo-orchestration"
1097+
- func: "run-server"
11191098
vars:
11201099
VERSION: "v6.0-perf"
1121-
TOPOLOGY: "server"
11221100
- func: "run perf tests"
11231101
- func: "attach benchmark test results"
11241102
- func: "send dashboard data"
11251103

11261104
- name: "perf-6.0-standalone-ssl"
11271105
tags: ["perf"]
11281106
commands:
1129-
- func: "bootstrap mongo-orchestration"
1107+
- func: "run-server"
11301108
vars:
11311109
VERSION: "v6.0-perf"
1132-
TOPOLOGY: "server"
11331110
SSL: "ssl"
11341111
- func: "run perf tests"
11351112
- func: "attach benchmark test results"
@@ -1138,10 +1115,9 @@ tasks:
11381115
- name: "perf-8.0-standalone"
11391116
tags: ["perf"]
11401117
commands:
1141-
- func: "bootstrap mongo-orchestration"
1118+
- func: "run-server"
11421119
vars:
11431120
VERSION: "8.0"
1144-
TOPOLOGY: "server"
11451121
- func: "run perf tests"
11461122
- func: "attach benchmark test results"
11471123
- func: "send dashboard data"

0 commit comments

Comments
 (0)