Skip to content

Commit 31dc8d2

Browse files
committed
cust-scorecard-tests - reduce parallelism
Signed-off-by: Tesshu Flower <[email protected]>
1 parent d9724fc commit 31dc8d2

File tree

8 files changed

+178
-93
lines changed

8 files changed

+178
-93
lines changed

custom-scorecard-tests/config.yaml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ stages:
3535
storage:
3636
spec:
3737
mountPath: {}
38-
- entrypoint:
39-
- volsync-custom-scorecard-tests
40-
- test_namespace_role.yml
41-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
42-
labels:
43-
suite: volsync-e2e
44-
test: test_namespace_role.yml
45-
storage:
46-
spec:
47-
mountPath: {}
4838
- entrypoint:
4939
- volsync-custom-scorecard-tests
5040
- test_rclone_normal.yml
@@ -187,111 +177,123 @@ stages:
187177
mountPath: {}
188178
- entrypoint:
189179
- volsync-custom-scorecard-tests
190-
- test_roles.yml
180+
- test_rsync_tls_normal.yml
191181
image: quay.io/backube/volsync-custom-scorecard-tests:latest
192182
labels:
193183
suite: volsync-e2e
194-
test: test_roles.yml
184+
test: test_rsync_tls_normal.yml
195185
storage:
196186
spec:
197187
mountPath: {}
198188
- entrypoint:
199189
- volsync-custom-scorecard-tests
200-
- test_roles_privileged.yml
190+
- test_rsync_tls_normal_diskrsync.yml
201191
image: quay.io/backube/volsync-custom-scorecard-tests:latest
202192
labels:
203193
suite: volsync-e2e
204-
test: test_roles_privileged.yml
194+
test: test_rsync_tls_normal_diskrsync.yml
205195
storage:
206196
spec:
207197
mountPath: {}
208198
- entrypoint:
209199
- volsync-custom-scorecard-tests
210-
- test_rsync_tls_normal.yml
200+
- test_rsync_tls_priv.yml
211201
image: quay.io/backube/volsync-custom-scorecard-tests:latest
212202
labels:
213203
suite: volsync-e2e
214-
test: test_rsync_tls_normal.yml
204+
test: test_rsync_tls_priv.yml
215205
storage:
216206
spec:
217207
mountPath: {}
218208
- entrypoint:
219209
- volsync-custom-scorecard-tests
220-
- test_rsync_tls_normal_diskrsync.yml
210+
- test_rsync_tls_priv_diskrsync.yml
221211
image: quay.io/backube/volsync-custom-scorecard-tests:latest
222212
labels:
223213
suite: volsync-e2e
224-
test: test_rsync_tls_normal_diskrsync.yml
214+
test: test_rsync_tls_priv_diskrsync.yml
225215
storage:
226216
spec:
227217
mountPath: {}
228218
- entrypoint:
229219
- volsync-custom-scorecard-tests
230-
- test_rsync_tls_priv.yml
220+
- test_simple_rsync.yml
231221
image: quay.io/backube/volsync-custom-scorecard-tests:latest
232222
labels:
233223
suite: volsync-e2e
234-
test: test_rsync_tls_priv.yml
224+
test: test_simple_rsync.yml
235225
storage:
236226
spec:
237227
mountPath: {}
238228
- entrypoint:
239229
- volsync-custom-scorecard-tests
240-
- test_rsync_tls_priv_diskrsync.yml
230+
- test_simple_rsync_diskrsync.yml
241231
image: quay.io/backube/volsync-custom-scorecard-tests:latest
242232
labels:
243233
suite: volsync-e2e
244-
test: test_rsync_tls_priv_diskrsync.yml
234+
test: test_simple_rsync_diskrsync.yml
245235
storage:
246236
spec:
247237
mountPath: {}
248238
- entrypoint:
249239
- volsync-custom-scorecard-tests
250-
- test_simple_rsync.yml
240+
- test_volumepopulator.yml
251241
image: quay.io/backube/volsync-custom-scorecard-tests:latest
252242
labels:
253243
suite: volsync-e2e
254-
test: test_simple_rsync.yml
244+
test: test_volumepopulator.yml
255245
storage:
256246
spec:
257247
mountPath: {}
248+
- parallel: true
249+
tests:
258250
- entrypoint:
259251
- volsync-custom-scorecard-tests
260-
- test_simple_rsync_diskrsync.yml
252+
- test_namespace_role.yml
261253
image: quay.io/backube/volsync-custom-scorecard-tests:latest
262254
labels:
263255
suite: volsync-e2e
264-
test: test_simple_rsync_diskrsync.yml
256+
test: test_namespace_role.yml
265257
storage:
266258
spec:
267259
mountPath: {}
268260
- entrypoint:
269261
- volsync-custom-scorecard-tests
270-
- test_syncthing_cluster_sync_normal.yml
262+
- test_roles.yml
271263
image: quay.io/backube/volsync-custom-scorecard-tests:latest
272264
labels:
273265
suite: volsync-e2e
274-
test: test_syncthing_cluster_sync_normal.yml
266+
test: test_roles.yml
275267
storage:
276268
spec:
277269
mountPath: {}
278270
- entrypoint:
279271
- volsync-custom-scorecard-tests
280-
- test_syncthing_cluster_sync_priv.yml
272+
- test_roles_privileged.yml
281273
image: quay.io/backube/volsync-custom-scorecard-tests:latest
282274
labels:
283275
suite: volsync-e2e
284-
test: test_syncthing_cluster_sync_priv.yml
276+
test: test_roles_privileged.yml
285277
storage:
286278
spec:
287279
mountPath: {}
288280
- entrypoint:
289281
- volsync-custom-scorecard-tests
290-
- test_volumepopulator.yml
282+
- test_syncthing_cluster_sync_normal.yml
291283
image: quay.io/backube/volsync-custom-scorecard-tests:latest
292284
labels:
293285
suite: volsync-e2e
294-
test: test_volumepopulator.yml
286+
test: test_syncthing_cluster_sync_normal.yml
287+
storage:
288+
spec:
289+
mountPath: {}
290+
- entrypoint:
291+
- volsync-custom-scorecard-tests
292+
- test_syncthing_cluster_sync_priv.yml
293+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
294+
labels:
295+
suite: volsync-e2e
296+
test: test_syncthing_cluster_sync_priv.yml
295297
storage:
296298
spec:
297299
mountPath: {}

custom-scorecard-tests/generateE2ETestsConfig.sh

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,28 @@ fi
1414

1515
TESTS=$(echo "${TESTS_UNSORTED}" | LC_ALL=C sort)
1616

17+
# Group tests into 2 stages (each stage gets run sequentially but
18+
# all tests in a stage can run in parallel)
19+
E2E_TESTS_GROUP1=$(echo "${TESTS}" | grep -v -e role -e syncthing)
20+
E2E_TESTS_GROUP2=$(echo "${TESTS}" | grep -e role -e syncthing)
21+
22+
echo "####################"
1723
echo "# E2E test list is: "
18-
echo "${TESTS}"
24+
echo "## Stage 1: "
25+
echo "${E2E_TESTS_GROUP1}"
26+
echo "## Stage 2: "
27+
echo "${E2E_TESTS_GROUP2}"
28+
echo "####################"
1929

20-
prereqs_patchfile="scorecard/patches/deploy-prereqs.yaml"
21-
e2e_tests_patchfile="scorecard/patches/e2e-tests.yaml"
30+
prereqs_patchfile="scorecard/patches/deploy-prereqs-stage0.yaml"
31+
e2e_tests_patchfile1="scorecard/patches/e2e-tests-stage1.yaml"
32+
e2e_tests_patchfile2="scorecard/patches/e2e-tests-stage2.yaml"
2233

2334
rm -rf "${prereqs_patchfile}"
24-
rm -rf "${e2e_tests_patchfile}"
35+
rm -rf "${e2e_tests_patchfile1}"
36+
rm -rf "${e2e_tests_patchfile2}"
2537

26-
# Prereqs
38+
# Prereqs (stage 0)
2739
cat <<EOF > "${prereqs_patchfile}"
2840
- op: add
2941
path: /stages/0/tests/-
@@ -37,15 +49,37 @@ cat <<EOF > "${prereqs_patchfile}"
3749
test: deploy-prereqs
3850
EOF
3951

40-
# E2E tests
41-
cat <<EOF > "${e2e_tests_patchfile}"
52+
# E2E tests - Group of e2e to run in parallel in stage 1
53+
cat <<EOF > "${e2e_tests_patchfile1}"
4254
- op: add
4355
path: /stages/1/tests
4456
value:
4557
EOF
4658

47-
for file in ${TESTS}; do
48-
cat <<EOF >> "${e2e_tests_patchfile}"
59+
for file in ${E2E_TESTS_GROUP1}; do
60+
cat <<EOF >> "${e2e_tests_patchfile1}"
61+
- entrypoint:
62+
- volsync-custom-scorecard-tests
63+
- ${file}
64+
image: ${CUSTOM_SCORECARD_IMG}
65+
labels:
66+
suite: volsync-e2e
67+
test: ${file}
68+
storage:
69+
spec:
70+
mountPath: {}
71+
EOF
72+
done
73+
74+
# E2E tests - Group of e2e to run in parallel in stage 2
75+
cat <<EOF > "${e2e_tests_patchfile2}"
76+
- op: add
77+
path: /stages/2/tests
78+
value:
79+
EOF
80+
81+
for file in ${E2E_TESTS_GROUP2}; do
82+
cat <<EOF >> "${e2e_tests_patchfile2}"
4983
- entrypoint:
5084
- volsync-custom-scorecard-tests
5185
- ${file}

custom-scorecard-tests/scorecard/bases/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ stages:
88
tests: []
99
- parallel: true
1010
tests: []
11+
- parallel: true
12+
tests: []
1113
storage:
1214
spec:
1315
mountPath: {}

custom-scorecard-tests/scorecard/kustomization.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ resources:
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
55
patches:
6-
- path: patches/deploy-prereqs.yaml
6+
- path: patches/deploy-prereqs-stage0.yaml
77
target:
88
group: scorecard.operatorframework.io
99
kind: Configuration
1010
name: config
1111
version: v1alpha3
12-
- path: patches/e2e-tests.yaml
12+
- path: patches/e2e-tests-stage1.yaml
13+
target:
14+
group: scorecard.operatorframework.io
15+
kind: Configuration
16+
name: config
17+
version: v1alpha3
18+
- path: patches/e2e-tests-stage2.yaml
1319
target:
1420
group: scorecard.operatorframework.io
1521
kind: Configuration

custom-scorecard-tests/scorecard/patches/e2e-tests.yaml renamed to custom-scorecard-tests/scorecard/patches/e2e-tests-stage1.yaml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@
2121
storage:
2222
spec:
2323
mountPath: {}
24-
- entrypoint:
25-
- volsync-custom-scorecard-tests
26-
- test_namespace_role.yml
27-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
28-
labels:
29-
suite: volsync-e2e
30-
test: test_namespace_role.yml
31-
storage:
32-
spec:
33-
mountPath: {}
3424
- entrypoint:
3525
- volsync-custom-scorecard-tests
3626
- test_rclone_normal.yml
@@ -171,26 +161,6 @@
171161
storage:
172162
spec:
173163
mountPath: {}
174-
- entrypoint:
175-
- volsync-custom-scorecard-tests
176-
- test_roles.yml
177-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
178-
labels:
179-
suite: volsync-e2e
180-
test: test_roles.yml
181-
storage:
182-
spec:
183-
mountPath: {}
184-
- entrypoint:
185-
- volsync-custom-scorecard-tests
186-
- test_roles_privileged.yml
187-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
188-
labels:
189-
suite: volsync-e2e
190-
test: test_roles_privileged.yml
191-
storage:
192-
spec:
193-
mountPath: {}
194164
- entrypoint:
195165
- volsync-custom-scorecard-tests
196166
- test_rsync_tls_normal.yml
@@ -251,26 +221,6 @@
251221
storage:
252222
spec:
253223
mountPath: {}
254-
- entrypoint:
255-
- volsync-custom-scorecard-tests
256-
- test_syncthing_cluster_sync_normal.yml
257-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
258-
labels:
259-
suite: volsync-e2e
260-
test: test_syncthing_cluster_sync_normal.yml
261-
storage:
262-
spec:
263-
mountPath: {}
264-
- entrypoint:
265-
- volsync-custom-scorecard-tests
266-
- test_syncthing_cluster_sync_priv.yml
267-
image: quay.io/backube/volsync-custom-scorecard-tests:latest
268-
labels:
269-
suite: volsync-e2e
270-
test: test_syncthing_cluster_sync_priv.yml
271-
storage:
272-
spec:
273-
mountPath: {}
274224
- entrypoint:
275225
- volsync-custom-scorecard-tests
276226
- test_volumepopulator.yml
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
- op: add
2+
path: /stages/2/tests
3+
value:
4+
- entrypoint:
5+
- volsync-custom-scorecard-tests
6+
- test_namespace_role.yml
7+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
8+
labels:
9+
suite: volsync-e2e
10+
test: test_namespace_role.yml
11+
storage:
12+
spec:
13+
mountPath: {}
14+
- entrypoint:
15+
- volsync-custom-scorecard-tests
16+
- test_roles.yml
17+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
18+
labels:
19+
suite: volsync-e2e
20+
test: test_roles.yml
21+
storage:
22+
spec:
23+
mountPath: {}
24+
- entrypoint:
25+
- volsync-custom-scorecard-tests
26+
- test_roles_privileged.yml
27+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
28+
labels:
29+
suite: volsync-e2e
30+
test: test_roles_privileged.yml
31+
storage:
32+
spec:
33+
mountPath: {}
34+
- entrypoint:
35+
- volsync-custom-scorecard-tests
36+
- test_syncthing_cluster_sync_normal.yml
37+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
38+
labels:
39+
suite: volsync-e2e
40+
test: test_syncthing_cluster_sync_normal.yml
41+
storage:
42+
spec:
43+
mountPath: {}
44+
- entrypoint:
45+
- volsync-custom-scorecard-tests
46+
- test_syncthing_cluster_sync_priv.yml
47+
image: quay.io/backube/volsync-custom-scorecard-tests:latest
48+
labels:
49+
suite: volsync-e2e
50+
test: test_syncthing_cluster_sync_priv.yml
51+
storage:
52+
spec:
53+
mountPath: {}

0 commit comments

Comments
 (0)