Skip to content

Commit de8a1bd

Browse files
committed
cleanup
1 parent c3398a3 commit de8a1bd

File tree

4 files changed

+75
-83
lines changed

4 files changed

+75
-83
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ functions:
256256
include_expansions_in_env: [AUTH, SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
257257
AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI,
258258
DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS, MONGODB_API_VERSION, DEBUG_LOG,
259-
OCSP_ALGORITHM, OCSP_SERVER_TYPE]
259+
ORCHESTRATION_FILE, OCSP_SERVER_TYPE]
260260
binary: bash
261261
working_dir: "src"
262262
args: [.evergreen/just.sh, setup-tests, "${TEST_NAME}", "${SUB_TEST_NAME}"]

.evergreen/generated_configs/tasks.yml

Lines changed: 54 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,6 @@ tasks:
755755
# Ocsp tests
756756
- name: test-ocsp-ecdsa-basic-tls-ocsp-disableStapling-valid
757757
commands:
758-
- func: run server
759-
vars:
760-
TEST_NAME: ocsp
761-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-disableStapling.json
762758
- func: run tests
763759
vars:
764760
OCSP_ALGORITHM: ecdsa
@@ -767,10 +763,6 @@ tasks:
767763
tags: [ocsp, ocsp-ecdsa]
768764
- name: test-ocsp-ecdsa-basic-tls-ocsp-disableStapling-revoked
769765
commands:
770-
- func: run server
771-
vars:
772-
TEST_NAME: ocsp
773-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-disableStapling.json
774766
- func: run tests
775767
vars:
776768
OCSP_ALGORITHM: ecdsa
@@ -779,17 +771,21 @@ tasks:
779771
tags: [ocsp, ocsp-ecdsa]
780772
- name: test-ocsp-ecdsa-basic-tls-ocsp-disableStapling-valid-delegate
781773
commands:
782-
- func: run server
783-
vars:
784-
TEST_NAME: ocsp
785-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-disableStapling.json
786774
- func: run tests
787775
vars:
788776
OCSP_ALGORITHM: ecdsa
789777
OCSP_SERVER_TYPE: valid-delegate
790778
TEST_NAME: ocsp
791779
tags: [ocsp, ocsp-ecdsa]
792780
- name: test-ocsp-ecdsa-basic-tls-ocsp-disableStapling-revoked-delegate
781+
commands:
782+
- func: run tests
783+
vars:
784+
OCSP_ALGORITHM: ecdsa
785+
OCSP_SERVER_TYPE: revoked-delegate
786+
TEST_NAME: ocsp
787+
tags: [ocsp, ocsp-ecdsa]
788+
- name: test-ocsp-ecdsa-basic-tls-ocsp-disableStapling-no-responder
793789
commands:
794790
- func: run server
795791
vars:
@@ -798,15 +794,11 @@ tasks:
798794
- func: run tests
799795
vars:
800796
OCSP_ALGORITHM: ecdsa
801-
OCSP_SERVER_TYPE: revoked-delegate
797+
OCSP_SERVER_TYPE: no-responder
802798
TEST_NAME: ocsp
803799
tags: [ocsp, ocsp-ecdsa]
804800
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-disableStapling-valid
805801
commands:
806-
- func: run server
807-
vars:
808-
TEST_NAME: ocsp
809-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json
810802
- func: run tests
811803
vars:
812804
OCSP_ALGORITHM: ecdsa
@@ -815,10 +807,6 @@ tasks:
815807
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
816808
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-disableStapling-revoked
817809
commands:
818-
- func: run server
819-
vars:
820-
TEST_NAME: ocsp
821-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json
822810
- func: run tests
823811
vars:
824812
OCSP_ALGORITHM: ecdsa
@@ -827,17 +815,21 @@ tasks:
827815
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
828816
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-disableStapling-valid-delegate
829817
commands:
830-
- func: run server
831-
vars:
832-
TEST_NAME: ocsp
833-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json
834818
- func: run tests
835819
vars:
836820
OCSP_ALGORITHM: ecdsa
837821
OCSP_SERVER_TYPE: valid-delegate
838822
TEST_NAME: ocsp
839823
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
840824
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-disableStapling-revoked-delegate
825+
commands:
826+
- func: run tests
827+
vars:
828+
OCSP_ALGORITHM: ecdsa
829+
OCSP_SERVER_TYPE: revoked-delegate
830+
TEST_NAME: ocsp
831+
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
832+
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-disableStapling-no-responder
841833
commands:
842834
- func: run server
843835
vars:
@@ -846,15 +838,11 @@ tasks:
846838
- func: run tests
847839
vars:
848840
OCSP_ALGORITHM: ecdsa
849-
OCSP_SERVER_TYPE: revoked-delegate
841+
OCSP_SERVER_TYPE: no-responder
850842
TEST_NAME: ocsp
851843
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
852844
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-valid
853845
commands:
854-
- func: run server
855-
vars:
856-
TEST_NAME: ocsp
857-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple.json
858846
- func: run tests
859847
vars:
860848
OCSP_ALGORITHM: ecdsa
@@ -863,10 +851,6 @@ tasks:
863851
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
864852
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-revoked
865853
commands:
866-
- func: run server
867-
vars:
868-
TEST_NAME: ocsp
869-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple.json
870854
- func: run tests
871855
vars:
872856
OCSP_ALGORITHM: ecdsa
@@ -875,17 +859,21 @@ tasks:
875859
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
876860
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-valid-delegate
877861
commands:
878-
- func: run server
879-
vars:
880-
TEST_NAME: ocsp
881-
ORCHESTRATION_FILE: ecdsa-basic-tls-ocsp-mustStaple.json
882862
- func: run tests
883863
vars:
884864
OCSP_ALGORITHM: ecdsa
885865
OCSP_SERVER_TYPE: valid-delegate
886866
TEST_NAME: ocsp
887867
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
888868
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-revoked-delegate
869+
commands:
870+
- func: run tests
871+
vars:
872+
OCSP_ALGORITHM: ecdsa
873+
OCSP_SERVER_TYPE: revoked-delegate
874+
TEST_NAME: ocsp
875+
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
876+
- name: test-ocsp-ecdsa-basic-tls-ocsp-mustStaple-no-responder
889877
commands:
890878
- func: run server
891879
vars:
@@ -894,15 +882,11 @@ tasks:
894882
- func: run tests
895883
vars:
896884
OCSP_ALGORITHM: ecdsa
897-
OCSP_SERVER_TYPE: revoked-delegate
885+
OCSP_SERVER_TYPE: no-responder
898886
TEST_NAME: ocsp
899887
tags: [ocsp, ocsp-ecdsa, ocsp-staple]
900888
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-disableStapling-valid
901889
commands:
902-
- func: run server
903-
vars:
904-
TEST_NAME: ocsp
905-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json
906890
- func: run tests
907891
vars:
908892
OCSP_ALGORITHM: rsa
@@ -911,10 +895,6 @@ tasks:
911895
tags: [ocsp, ocsp-rsa, ocsp-staple]
912896
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-disableStapling-revoked
913897
commands:
914-
- func: run server
915-
vars:
916-
TEST_NAME: ocsp
917-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json
918898
- func: run tests
919899
vars:
920900
OCSP_ALGORITHM: rsa
@@ -923,17 +903,21 @@ tasks:
923903
tags: [ocsp, ocsp-rsa, ocsp-staple]
924904
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-disableStapling-valid-delegate
925905
commands:
926-
- func: run server
927-
vars:
928-
TEST_NAME: ocsp
929-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json
930906
- func: run tests
931907
vars:
932908
OCSP_ALGORITHM: rsa
933909
OCSP_SERVER_TYPE: valid-delegate
934910
TEST_NAME: ocsp
935911
tags: [ocsp, ocsp-rsa, ocsp-staple]
936912
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-disableStapling-revoked-delegate
913+
commands:
914+
- func: run tests
915+
vars:
916+
OCSP_ALGORITHM: rsa
917+
OCSP_SERVER_TYPE: revoked-delegate
918+
TEST_NAME: ocsp
919+
tags: [ocsp, ocsp-rsa, ocsp-staple]
920+
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-disableStapling-no-responder
937921
commands:
938922
- func: run server
939923
vars:
@@ -942,15 +926,11 @@ tasks:
942926
- func: run tests
943927
vars:
944928
OCSP_ALGORITHM: rsa
945-
OCSP_SERVER_TYPE: revoked-delegate
929+
OCSP_SERVER_TYPE: no-responder
946930
TEST_NAME: ocsp
947931
tags: [ocsp, ocsp-rsa, ocsp-staple]
948932
- name: test-ocsp-rsa-basic-tls-ocsp-disableStapling-valid
949933
commands:
950-
- func: run server
951-
vars:
952-
TEST_NAME: ocsp
953-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json
954934
- func: run tests
955935
vars:
956936
OCSP_ALGORITHM: rsa
@@ -959,10 +939,6 @@ tasks:
959939
tags: [ocsp, ocsp-rsa]
960940
- name: test-ocsp-rsa-basic-tls-ocsp-disableStapling-revoked
961941
commands:
962-
- func: run server
963-
vars:
964-
TEST_NAME: ocsp
965-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json
966942
- func: run tests
967943
vars:
968944
OCSP_ALGORITHM: rsa
@@ -971,17 +947,21 @@ tasks:
971947
tags: [ocsp, ocsp-rsa]
972948
- name: test-ocsp-rsa-basic-tls-ocsp-disableStapling-valid-delegate
973949
commands:
974-
- func: run server
975-
vars:
976-
TEST_NAME: ocsp
977-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json
978950
- func: run tests
979951
vars:
980952
OCSP_ALGORITHM: rsa
981953
OCSP_SERVER_TYPE: valid-delegate
982954
TEST_NAME: ocsp
983955
tags: [ocsp, ocsp-rsa]
984956
- name: test-ocsp-rsa-basic-tls-ocsp-disableStapling-revoked-delegate
957+
commands:
958+
- func: run tests
959+
vars:
960+
OCSP_ALGORITHM: rsa
961+
OCSP_SERVER_TYPE: revoked-delegate
962+
TEST_NAME: ocsp
963+
tags: [ocsp, ocsp-rsa]
964+
- name: test-ocsp-rsa-basic-tls-ocsp-disableStapling-no-responder
985965
commands:
986966
- func: run server
987967
vars:
@@ -990,15 +970,11 @@ tasks:
990970
- func: run tests
991971
vars:
992972
OCSP_ALGORITHM: rsa
993-
OCSP_SERVER_TYPE: revoked-delegate
973+
OCSP_SERVER_TYPE: no-responder
994974
TEST_NAME: ocsp
995975
tags: [ocsp, ocsp-rsa]
996976
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-valid
997977
commands:
998-
- func: run server
999-
vars:
1000-
TEST_NAME: ocsp
1001-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json
1002978
- func: run tests
1003979
vars:
1004980
OCSP_ALGORITHM: rsa
@@ -1007,10 +983,6 @@ tasks:
1007983
tags: [ocsp, ocsp-rsa, ocsp-staple]
1008984
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-revoked
1009985
commands:
1010-
- func: run server
1011-
vars:
1012-
TEST_NAME: ocsp
1013-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json
1014986
- func: run tests
1015987
vars:
1016988
OCSP_ALGORITHM: rsa
@@ -1019,17 +991,21 @@ tasks:
1019991
tags: [ocsp, ocsp-rsa, ocsp-staple]
1020992
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-valid-delegate
1021993
commands:
1022-
- func: run server
1023-
vars:
1024-
TEST_NAME: ocsp
1025-
ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json
1026994
- func: run tests
1027995
vars:
1028996
OCSP_ALGORITHM: rsa
1029997
OCSP_SERVER_TYPE: valid-delegate
1030998
TEST_NAME: ocsp
1031999
tags: [ocsp, ocsp-rsa, ocsp-staple]
10321000
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-revoked-delegate
1001+
commands:
1002+
- func: run tests
1003+
vars:
1004+
OCSP_ALGORITHM: rsa
1005+
OCSP_SERVER_TYPE: revoked-delegate
1006+
TEST_NAME: ocsp
1007+
tags: [ocsp, ocsp-rsa, ocsp-staple]
1008+
- name: test-ocsp-rsa-basic-tls-ocsp-mustStaple-no-responder
10331009
commands:
10341010
- func: run server
10351011
vars:
@@ -1038,7 +1014,7 @@ tasks:
10381014
- func: run tests
10391015
vars:
10401016
OCSP_ALGORITHM: rsa
1041-
OCSP_SERVER_TYPE: revoked-delegate
1017+
OCSP_SERVER_TYPE: no-responder
10421018
TEST_NAME: ocsp
10431019
tags: [ocsp, ocsp-rsa, ocsp-staple]
10441020

.evergreen/scripts/generate_config.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,10 @@ def _create_ocsp_task(file_name, server_type):
900900

901901
name = file_name.replace(".json", "")
902902
task_name = f"test-ocsp-{name}-{server_type}"
903-
commands = [server_func, test_func]
903+
if server_type == "no-responder":
904+
commands = [server_func, test_func]
905+
else:
906+
commands = [test_func]
904907
return EvgTask(name=task_name, tags=tags, commands=commands)
905908

906909

@@ -911,9 +914,16 @@ def create_ocsp_tasks():
911914
for path in config_path.glob("*ocsp*"):
912915
if "singleEndpoint" in path.name:
913916
continue
914-
for server_type in ["valid", "revoked", "valid-delegate", "revoked-delegate"]:
917+
for server_type in [
918+
"valid",
919+
"revoked",
920+
"valid-delegate",
921+
"revoked-delegate",
922+
"no-responder",
923+
]:
915924
task = _create_ocsp_task(path.name, server_type)
916925
tasks.append(task)
926+
917927
return tasks
918928

919929

.evergreen/scripts/setup_tests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,17 @@ def handle_test_env() -> None:
245245
for name in ["OCSP_SERVER_TYPE", "ORCHESTRATION_FILE"]:
246246
if name not in os.environ:
247247
raise ValueError(f"Please set {name}")
248+
248249
server_type = os.environ["OCSP_SERVER_TYPE"]
249-
should_succeed = "true" if "valid" in server_type else "false"
250-
write_env("OCSP_TLS_SHOULD_SUCCEED", should_succeed)
251250
ocsp_algo = os.environ["ORCHESTRATION_FILE"].split("-")[0]
251+
if server_type == "no-reponder":
252+
should_succeed = "mustStaple" not in ocsp_algo
253+
else:
254+
should_succeed = "true" if "valid" in server_type else "false"
255+
256+
write_env("OCSP_TLS_SHOULD_SUCCEED", should_succeed)
252257
write_env("CA_FILE", f"{DRIVERS_TOOLS}/.evergreen/ocsp/{ocsp_algo}/ca.pem")
258+
253259
env = os.environ.copy()
254260
env["SERVER_TYPE"] = server_type
255261
env["OCSP_ALGORITHM"] = ocsp_algo

0 commit comments

Comments
 (0)