mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Merge pull request #17610 from ixdy/resource-check
Auto commit by PR queue bot
This commit is contained in:
commit
3117fa472d
@ -500,6 +500,7 @@ case ${JOB_NAME} in
|
|||||||
: ${KUBE_GCE_INSTANCE_PREFIX:="gce-soak-weekly-1-1"}
|
: ${KUBE_GCE_INSTANCE_PREFIX:="gce-soak-weekly-1-1"}
|
||||||
: ${KUBE_GCS_STAGING_PATH_SUFFIX:="soak-1.1"}
|
: ${KUBE_GCS_STAGING_PATH_SUFFIX:="soak-1.1"}
|
||||||
: ${PROJECT:="kubernetes-jenkins"}
|
: ${PROJECT:="kubernetes-jenkins"}
|
||||||
|
: ${FAIL_ON_GCP_RESOURCE_LEAK:="true"}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Runs tests on GCE soak cluster for latest 1.1 ci release.
|
# Runs tests on GCE soak cluster for latest 1.1 ci release.
|
||||||
@ -1685,9 +1686,11 @@ fi
|
|||||||
### Set up ###
|
### Set up ###
|
||||||
if [[ "${E2E_UP,,}" == "true" ]]; then
|
if [[ "${E2E_UP,,}" == "true" ]]; then
|
||||||
go run ./hack/e2e.go ${E2E_OPT} -v --down
|
go run ./hack/e2e.go ${E2E_OPT} -v --down
|
||||||
if [[ "${gcp_list_resources}" == "true" ]]; then
|
fi
|
||||||
${gcp_list_resources_script} > "${gcp_resources_before}"
|
if [[ "${gcp_list_resources}" == "true" ]]; then
|
||||||
fi
|
${gcp_list_resources_script} > "${gcp_resources_before}"
|
||||||
|
fi
|
||||||
|
if [[ "${E2E_UP,,}" == "true" ]]; then
|
||||||
go run ./hack/e2e.go ${E2E_OPT} -v --up
|
go run ./hack/e2e.go ${E2E_OPT} -v --up
|
||||||
go run ./hack/e2e.go -v --ctl="version --match-server-version=false"
|
go run ./hack/e2e.go -v --ctl="version --match-server-version=false"
|
||||||
if [[ "${gcp_list_resources}" == "true" ]]; then
|
if [[ "${gcp_list_resources}" == "true" ]]; then
|
||||||
@ -1735,12 +1738,15 @@ if [[ "${E2E_DOWN,,}" == "true" ]]; then
|
|||||||
# for the wait between attempts.
|
# for the wait between attempts.
|
||||||
sleep 30
|
sleep 30
|
||||||
go run ./hack/e2e.go ${E2E_OPT} -v --down
|
go run ./hack/e2e.go ${E2E_OPT} -v --down
|
||||||
if [[ "${gcp_list_resources}" == "true" ]]; then
|
fi
|
||||||
${gcp_list_resources_script} > "${gcp_resources_after}"
|
if [[ "${gcp_list_resources}" == "true" ]]; then
|
||||||
fi
|
${gcp_list_resources_script} > "${gcp_resources_after}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "${gcp_resources_before}" && -f "${gcp_resources_after}" ]]; then
|
# Compare resources if either the cluster was
|
||||||
|
# * started and destroyed (normal e2e)
|
||||||
|
# * neither started nor destroyed (soak test)
|
||||||
|
if [[ "${E2E_UP:-}" == "${E2E_DOWN:-}" && -f "${gcp_resources_before}" && -f "${gcp_resources_after}" ]]; then
|
||||||
if ! diff -sw -U0 -F'^\[.*\]$' "${gcp_resources_before}" "${gcp_resources_after}" && [[ "${FAIL_ON_GCP_RESOURCE_LEAK:-}" == "true" ]]; then
|
if ! diff -sw -U0 -F'^\[.*\]$' "${gcp_resources_before}" "${gcp_resources_after}" && [[ "${FAIL_ON_GCP_RESOURCE_LEAK:-}" == "true" ]]; then
|
||||||
echo "!!! FAIL: Google Cloud Platform resources leaked while running tests!"
|
echo "!!! FAIL: Google Cloud Platform resources leaked while running tests!"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user