Skip to content

Commit 41be451

Browse files
committed
add tasks for runnning integ tests against every topology
1 parent 692bcde commit 41be451

2 files changed

Lines changed: 182 additions & 45 deletions

File tree

.evergreen/config.in.yml

Lines changed: 94 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ functions:
3434
directory: "src"
3535
shallow_clone: true # speed things up by limiting clone depth to 100
3636

37-
# Checkout the desired source revision if specified
38-
- command: shell.exec
39-
params:
40-
working_dir: src
41-
shell: bash
42-
script: |
43-
set -euxo pipefail
44-
# Only override if source_rev is set (use | to default to empty)
45-
if [ "${source_rev|}" != "" ]; then
46-
git reset --hard HEAD
47-
git clean -xfd
48-
git fetch origin "${source_rev}"
49-
git checkout "${source_rev}"
50-
fi
51-
5237
# Make an evergreen expansion file with dynamic values
5338
- command: subprocess.exec
5439
params:
@@ -65,6 +50,19 @@ functions:
6550
params:
6651
file: src/expansion.yml
6752

53+
"switch source":
54+
# Checkout the desired source revision if specified
55+
- command: shell.exec
56+
params:
57+
working_dir: src
58+
shell: bash
59+
script: |
60+
set -euxo pipefail
61+
git reset --hard HEAD
62+
git clean -xfd
63+
git fetch origin "${SOURCE_REV}"
64+
git checkout "${SOURCE_REV}"
65+
6866
"bootstrap mongo-orchestration":
6967
- command: subprocess.exec
7068
params:
@@ -990,22 +988,93 @@ tasks:
990988
args:
991989
- .evergreen/run-search-index-management-tests.sh
992990

993-
- name: test-bson-latest-server-7.0.0
991+
- name: test-bson-latest-server-7.0.0-unit-tests
994992
commands:
995993
- command: expansions.update
996994
type: setup
997995
params:
998996
updates:
999-
- { key: VERSION, value: "latest" }
1000-
- { key: NODE_LTS_VERSION, value: '24'}
1001-
- { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" }
997+
- {key: VERSION, value: latest}
998+
- {key: NODE_LTS_VERSION, value: '20.19.0'}
1002999
- func: install dependencies
1003-
- func: bootstrap mongo-orchestration
1004-
- func: fetch source
1000+
- func: switch source
1001+
vars:
1002+
SOURCE_REV: refs/tags/v7.0.0
10051003
- func: install package
1004+
vars:
1005+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
10061006
- func: log state
10071007
- func: run unit tests
10081008

1009+
- name: test-bson-latest-server-7.0.0-server-tests
1010+
commands:
1011+
- command: expansions.update
1012+
type: setup
1013+
params:
1014+
updates:
1015+
- {key: VERSION, value: latest}
1016+
- {key: TOPOLOGY, value: server}
1017+
- {key: AUTH, value: noauth}
1018+
- {key: SSL, value: nossl}
1019+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1020+
- {key: NODE_LTS_VERSION, value: '20.19.0'}
1021+
- func: install dependencies
1022+
- func: bootstrap mongo-orchestration
1023+
- func: switch source
1024+
vars:
1025+
SOURCE_REV: refs/tags/v7.0.0
1026+
- func: install package
1027+
vars:
1028+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1029+
- func: log state
1030+
- func: run tests
1031+
1032+
- name: test-bson-latest-server-7.0.0-replica_set-tests
1033+
commands:
1034+
- command: expansions.update
1035+
type: setup
1036+
params:
1037+
updates:
1038+
- {key: VERSION, value: latest}
1039+
- {key: TOPOLOGY, value: replica_set}
1040+
- {key: AUTH, value: noauth}
1041+
- {key: SSL, value: nossl}
1042+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1043+
- {key: NODE_LTS_VERSION, value: '20.19.0'}
1044+
- func: install dependencies
1045+
- func: bootstrap mongo-orchestration
1046+
- func: switch source
1047+
vars:
1048+
SOURCE_REV: refs/tags/v7.0.0
1049+
- func: install package
1050+
vars:
1051+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1052+
- func: log state
1053+
- func: run tests
1054+
1055+
- name: test-bson-latest-server-7.0.0-sharded_cluster-tests
1056+
commands:
1057+
- command: expansions.update
1058+
type: setup
1059+
params:
1060+
updates:
1061+
- {key: VERSION, value: latest}
1062+
- {key: TOPOLOGY, value: sharded_cluster}
1063+
- {key: AUTH, value: noauth}
1064+
- {key: SSL, value: nossl}
1065+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1066+
- {key: NODE_LTS_VERSION, value: '20.19.0'}
1067+
- func: install dependencies
1068+
- func: bootstrap mongo-orchestration
1069+
- func: switch source
1070+
vars:
1071+
SOURCE_REV: refs/tags/v7.0.0
1072+
- func: install package
1073+
vars:
1074+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1075+
- func: log state
1076+
- func: run tests
1077+
10091078
task_groups:
10101079
- name: test_gcpkms_task_group
10111080
setup_group_can_fail_task: true
@@ -1291,7 +1360,8 @@ buildvariants:
12911360
- name: BSON compatibility tests
12921361
display_name: BSON compatibility tests
12931362
run_on: rhel80-large
1294-
expansions:
1295-
source_rev: refs/tags/v7.0.0
12961363
tasks:
1297-
- test-bson-latest-server-7.0.0
1364+
- test-bson-latest-server-7.0.0-unit-tests
1365+
- test-bson-latest-server-7.0.0-server-tests
1366+
- test-bson-latest-server-7.0.0-replica_set-tests
1367+
- test-bson-latest-server-7.0.0-sharded_cluster-tests

.evergreen/config.yml

Lines changed: 88 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ functions:
1717
params:
1818
directory: src
1919
shallow_clone: true
20-
- command: shell.exec
21-
params:
22-
working_dir: src
23-
shell: bash
24-
script: |
25-
set -euxo pipefail
26-
# Only override if source_rev is set (use | to default to empty)
27-
if [ "${source_rev|}" != "" ]; then
28-
git reset --hard HEAD
29-
git clean -xfd
30-
git fetch origin "${source_rev}"
31-
git checkout "${source_rev}"
32-
fi
3320
- command: subprocess.exec
3421
params:
3522
working_dir: src
@@ -42,6 +29,17 @@ functions:
4229
- command: expansions.update
4330
params:
4431
file: src/expansion.yml
32+
switch source:
33+
- command: shell.exec
34+
params:
35+
working_dir: src
36+
shell: bash
37+
script: |
38+
set -euxo pipefail
39+
git reset --hard HEAD
40+
git clean -xfd
41+
git fetch origin "${SOURCE_REV}"
42+
git checkout "${SOURCE_REV}"
4543
bootstrap mongo-orchestration:
4644
- command: subprocess.exec
4745
params:
@@ -914,21 +912,89 @@ tasks:
914912
add_expansions_to_env: true
915913
args:
916914
- .evergreen/run-search-index-management-tests.sh
917-
- name: test-bson-latest-server-7.0.0
915+
- name: test-bson-latest-server-7.0.0-unit-tests
918916
commands:
919917
- command: expansions.update
920918
type: setup
921919
params:
922920
updates:
923921
- {key: VERSION, value: latest}
924-
- {key: NODE_LTS_VERSION, value: '24'}
925-
- {key: PACKAGE, value: https://github.com/mongodb/js-bson#HEAD}
922+
- {key: NODE_LTS_VERSION, value: 20.19.0}
926923
- func: install dependencies
927-
- func: bootstrap mongo-orchestration
928-
- func: fetch source
924+
- func: switch source
925+
vars:
926+
SOURCE_REV: refs/tags/v7.0.0
929927
- func: install package
928+
vars:
929+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
930930
- func: log state
931931
- func: run unit tests
932+
- name: test-bson-latest-server-7.0.0-server-tests
933+
commands:
934+
- command: expansions.update
935+
type: setup
936+
params:
937+
updates:
938+
- {key: VERSION, value: latest}
939+
- {key: TOPOLOGY, value: server}
940+
- {key: AUTH, value: noauth}
941+
- {key: SSL, value: nossl}
942+
- {key: CLIENT_ENCRYPTION, value: 'false'}
943+
- {key: NODE_LTS_VERSION, value: 20.19.0}
944+
- func: install dependencies
945+
- func: bootstrap mongo-orchestration
946+
- func: switch source
947+
vars:
948+
SOURCE_REV: refs/tags/v7.0.0
949+
- func: install package
950+
vars:
951+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
952+
- func: log state
953+
- func: run tests
954+
- name: test-bson-latest-server-7.0.0-replica_set-tests
955+
commands:
956+
- command: expansions.update
957+
type: setup
958+
params:
959+
updates:
960+
- {key: VERSION, value: latest}
961+
- {key: TOPOLOGY, value: replica_set}
962+
- {key: AUTH, value: noauth}
963+
- {key: SSL, value: nossl}
964+
- {key: CLIENT_ENCRYPTION, value: 'false'}
965+
- {key: NODE_LTS_VERSION, value: 20.19.0}
966+
- func: install dependencies
967+
- func: bootstrap mongo-orchestration
968+
- func: switch source
969+
vars:
970+
SOURCE_REV: refs/tags/v7.0.0
971+
- func: install package
972+
vars:
973+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
974+
- func: log state
975+
- func: run tests
976+
- name: test-bson-latest-server-7.0.0-sharded_cluster-tests
977+
commands:
978+
- command: expansions.update
979+
type: setup
980+
params:
981+
updates:
982+
- {key: VERSION, value: latest}
983+
- {key: TOPOLOGY, value: sharded_cluster}
984+
- {key: AUTH, value: noauth}
985+
- {key: SSL, value: nossl}
986+
- {key: CLIENT_ENCRYPTION, value: 'false'}
987+
- {key: NODE_LTS_VERSION, value: 20.19.0}
988+
- func: install dependencies
989+
- func: bootstrap mongo-orchestration
990+
- func: switch source
991+
vars:
992+
SOURCE_REV: refs/tags/v7.0.0
993+
- func: install package
994+
vars:
995+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
996+
- func: log state
997+
- func: run tests
932998
- name: test-latest-server
933999
tags:
9341000
- latest
@@ -3436,10 +3502,11 @@ buildvariants:
34363502
- name: BSON compatibility tests
34373503
display_name: BSON compatibility tests
34383504
run_on: rhel80-large
3439-
expansions:
3440-
source_rev: refs/tags/v7.0.0
34413505
tasks:
3442-
- test-bson-latest-server-7.0.0
3506+
- test-bson-latest-server-7.0.0-unit-tests
3507+
- test-bson-latest-server-7.0.0-server-tests
3508+
- test-bson-latest-server-7.0.0-replica_set-tests
3509+
- test-bson-latest-server-7.0.0-sharded_cluster-tests
34433510
- name: rhel80-large-iron
34443511
display_name: rhel8 Node20.19.0
34453512
run_on: rhel80-large

0 commit comments

Comments
 (0)