Skip to content

Commit b2dbce8

Browse files
committed
.prow.sh: enable Prow testing
With some tweaking it is possible to use most of the E2E testing scripts from csi-release-tools. Sanity testing is not enabled.
1 parent f31e6a0 commit b2dbce8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.prow.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#! /bin/bash
2+
3+
# Only these tests work for csi-drivers-flex, E2E and sanity testing
4+
# will require further work.
5+
: ${CSI_PROW_TESTS:="unit serial parallel serial-alpha parallel-alpha"}
6+
7+
# Customize deployment and E2E testing.
8+
: ${CSI_PROW_DEPLOY_SCRIPT:="deploy.sh"}
9+
: ${CSI_PROW_DEPLOYMENT:="kubernetes"}
10+
: ${CSI_PROW_E2E_TEST_PREFIX:="CSI Volumes"}
11+
12+
. release-tools/prow.sh
13+
14+
# Install custom E2E test suite as bin/tests.
15+
install_e2e () {
16+
if [ -e "${CSI_PROW_WORK}/e2e.test" ]; then
17+
return
18+
fi
19+
20+
make build-tests && cp bin/tests "${CSI_PROW_WORK}/e2e.test"
21+
}
22+
23+
# Invoke the custom E2E test suite for a certain subset of the tests (serial, parallel, ...)
24+
run_e2e () (
25+
name="$1"
26+
shift
27+
28+
install_e2e || die "building e2e.test failed"
29+
install_ginkgo || die "installing ginkgo failed"
30+
31+
trap "move_junit '$name'" EXIT
32+
33+
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
34+
run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}"
35+
)
36+
37+
main

0 commit comments

Comments
 (0)