# Ignore: Double quote to prevent globbing and word splitting.
# Ignore: Double quote to prevent globbing and word splitting.
# It's intentional here for $images.
# It's intentional here for $images.
# shellcheck disable=SC2086
# shellcheck disable=SC2086
if! run env$images"${deploy_hostpath}";then
if! run env"CSI_PROW_TEST_DRIVER=${CSI_PROW_WORK}/test-driver.yaml"$images"${deploy_driver}";then
# Collect information about failed deployment before failing.
# Collect information about failed deployment before failing.
collect_cluster_info
collect_cluster_info
(start_loggers >/dev/null;wait)
(start_loggers >/dev/null;wait)
info "For container output see job artifacts."
info "For container output see job artifacts."
die "deploying the hostpath driver with ${deploy_hostpath} failed"
die "deploying the CSI driver with ${deploy_driver} failed"
fi
fi
}
}
...
@@ -811,33 +822,6 @@ install_sanity () (
...
@@ -811,33 +822,6 @@ install_sanity () (
run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test-c-o"${CSI_PROW_WORK}/csi-sanity""${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity"|| die "building csi-sanity failed"
run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test-c-o"${CSI_PROW_WORK}/csi-sanity""${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity"|| die "building csi-sanity failed"
)
)
# The default implementation of this function generates a external
# driver test configuration for the hostpath driver.
#
# The content depends on both what the E2E suite expects and what the
# installed hostpath driver supports. Generating it here seems prone
# to breakage, but it is uncertain where a better place might be.
generate_test_driver (){
cat<<EOF
ShortName: csiprow
StorageClass:
FromName: true
SnapshotClass:
FromName: true
DriverInfo:
Name: ${CSI_PROW_HOSTPATH_DRIVER_NAME}
Capabilities:
block: true
persistence: true
dataSource: true
multipods: true
nodeExpansion: true
controllerExpansion: true
snapshotDataSource: true
singleNodeVolume: true
EOF
}
# Captures pod output while running some other command.
# Captures pod output while running some other command.
run_with_loggers ()(
run_with_loggers ()(
loggers=$(start_loggers -f)
loggers=$(start_loggers -f)
...
@@ -859,8 +843,6 @@ run_e2e () (
...
@@ -859,8 +843,6 @@ run_e2e () (
install_e2e || die "building e2e.test failed"
install_e2e || die "building e2e.test failed"
install_ginkgo || die "installing ginkgo failed"
install_ginkgo || die "installing ginkgo failed"
generate_test_driver >"${CSI_PROW_WORK}/test-driver.yaml"|| die "generating test-driver.yaml failed"
# Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again
# Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again
# and to avoid the large number of "skipped" tests that we get from using
# and to avoid the large number of "skipped" tests that we get from using
# the full Kubernetes E2E testsuite while only running a few tests.
# the full Kubernetes E2E testsuite while only running a few tests.