mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
Set shell options for reliability.
Tweak a few other small things in our shell scripts.
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
# Starts a Kubernetes cluster, runs the e2e test suite, and shuts it
|
||||
# down.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Use testing config
|
||||
export KUBE_CONFIG_FILE="config-test.sh"
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
@@ -34,9 +38,6 @@ ALREADY_UP=${1:-0}
|
||||
LEAVE_UP=${2:-0}
|
||||
TEAR_DOWN=${3:-0}
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
if [[ $TEAR_DOWN -ne 0 ]]; then
|
||||
detect-project
|
||||
trap test-teardown EXIT
|
||||
|
Reference in New Issue
Block a user