Skip to content

Commit 3540ef1

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 3540ef1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.prow.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 builds-tests
21+
cp bin/tests "${CSI_PROW_WORK}/e2e.test"
22+
}
23+
24+
# Invoke the custom E2E test suite for a certain subset of the tests (serial, parallel, ...)
25+
run_e2e () (
26+
name="$1"
27+
shift
28+
29+
install_e2e || die "building e2e.test failed"
30+
install_ginkgo || die "installing ginkgo failed"
31+
32+
trap "move_junit '$name'" EXIT
33+
34+
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
35+
run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}"
36+
)
37+
38+
main

0 commit comments

Comments
 (0)