Skip to content

Commit

Permalink
Update expected test output for script changes
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Sep 21, 2018
1 parent 8a483c1 commit 237043d
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 80 deletions.
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
11 changes: 6 additions & 5 deletions pkg/model/tests/data/bootstrapscript_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ download-or-bust() {

if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then

# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi

if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,20 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1bmastersadditionalcidrex
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down Expand Up @@ -327,19 +328,20 @@ Resources.AWSAutoScalingLaunchConfigurationnodesadditionalcidrexamplecom.Propert
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,20 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersadditionaluserda
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down Expand Up @@ -357,19 +358,20 @@ Resources.AWSAutoScalingLaunchConfigurationnodesadditionaluserdataexamplecom.Pro
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,20 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersminimalexampleco
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down Expand Up @@ -327,19 +328,20 @@ Resources.AWSAutoScalingLaunchConfigurationnodesminimalexamplecom.Properties.Use
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,20 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersexternallbexampl
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down Expand Up @@ -347,19 +348,20 @@ Resources.AWSAutoScalingLaunchConfigurationnodesexternallbexamplecom.Properties.
if [[ -e "${file}" ]]; then
echo "== File exists for ${url} =="
elif [[ $(which curl) ]]; then
# CoreOS runs this script in a container without which (but has curl)
# Note also that busybox wget doesn't support wget --version, but busybox doesn't normally have curl
# So we default to wget unless we see curl
elif [[ $(curl --version) ]]; then
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
echo "== Failed to curl ${url}. Retrying. =="
break
fi
elif [[ $(which wget ) ]]; then
else
if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then
echo "== Failed to wget ${url}. Retrying. =="
break
fi
else
echo "== Could not find curl or wget. Retrying. =="
break
fi
if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
Expand Down
Loading

0 comments on commit 237043d

Please sign in to comment.