mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-31 08:36:16 +00:00
When checking for leak look only at additional resources
This commit is contained in:
@@ -328,7 +328,9 @@ fi
|
||||
# * 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
|
||||
difference=$(diff -sw -U0 -F'^\[.*\]$' "${gcp_resources_before}" "${gcp_resources_after}") || true
|
||||
if [[ -n $(echo "${difference}" | tail -n +3 | grep -E "^\+") ]] && [[ "${FAIL_ON_GCP_RESOURCE_LEAK:-}" == "true" ]]; then
|
||||
echo "${difference}"
|
||||
echo "!!! FAIL: Google Cloud Platform resources leaked while running tests!"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user