From ccc6d62bad11a4616ae6cca61a11c51d1a392348 Mon Sep 17 00:00:00 2001 From: Austin Moore Date: Thu, 10 Oct 2019 14:21:02 -0400 Subject: [PATCH] Update expected test output --- .../cloudformation.json.extracted.yaml | 90 +++++++++---------- 1 file changed, 40 insertions(+), 50 deletions(-) diff --git a/tests/integration/update_cluster/nosshkey-cloudformation/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/nosshkey-cloudformation/cloudformation.json.extracted.yaml index 80dcae1460791..4e3706b9b0a97 100644 --- a/tests/integration/update_cluster/nosshkey-cloudformation/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/nosshkey-cloudformation/cloudformation.json.extracted.yaml @@ -45,35 +45,30 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersnosshkeyexamplec urls=( $* ) while true; do for url in "${urls[@]}"; do - if [[ -e "${file}" ]]; then - echo "== File exists for ${url} ==" - - # 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. ==" + commands=( + "curl -f --ipv4 --compressed -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10" + "wget --inet4-only --compression=auto -O "${file}" --connect-timeout=20 --tries=6 --wait=10" + "curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10" + "wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10" + ) + for cmd in "${commands[@]}"; do + echo "Attempting download with: ${cmd} {url}" + if ! (${cmd} "${url}"); then + echo "== Download failed with ${cmd} ==" continue fi - else - if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then - echo "== Failed to wget ${url}. Retrying. ==" - continue - fi - fi - - if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then - echo "== Hash validation of ${url} failed. Retrying. ==" - rm -f "${file}" - else - if [[ -n "${hash}" ]]; then - echo "== Downloaded ${url} (SHA1 = ${hash}) ==" + if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then + echo "== Hash validation of ${url} failed. Retrying. ==" + rm -f "${file}" else - echo "== Downloaded ${url} ==" + if [[ -n "${hash}" ]]; then + echo "== Downloaded ${url} (SHA1 = ${hash}) ==" + else + echo "== Downloaded ${url} ==" + fi + return fi - return - fi + done done echo "All downloads failed; sleeping before retrying" @@ -341,35 +336,30 @@ Resources.AWSAutoScalingLaunchConfigurationnodesnosshkeyexamplecom.Properties.Us urls=( $* ) while true; do for url in "${urls[@]}"; do - if [[ -e "${file}" ]]; then - echo "== File exists for ${url} ==" - - # 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. ==" - continue - fi - else - if ! wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10 "${url}"; then - echo "== Failed to wget ${url}. Retrying. ==" + commands=( + "curl -f --ipv4 --compressed -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10" + "wget --inet4-only --compression=auto -O "${file}" --connect-timeout=20 --tries=6 --wait=10" + "curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10" + "wget --inet4-only -O "${file}" --connect-timeout=20 --tries=6 --wait=10" + ) + for cmd in "${commands[@]}"; do + echo "Attempting download with: ${cmd} {url}" + if ! (${cmd} "${url}"); then + echo "== Download failed with ${cmd} ==" continue fi - fi - - if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then - echo "== Hash validation of ${url} failed. Retrying. ==" - rm -f "${file}" - else - if [[ -n "${hash}" ]]; then - echo "== Downloaded ${url} (SHA1 = ${hash}) ==" + if [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then + echo "== Hash validation of ${url} failed. Retrying. ==" + rm -f "${file}" else - echo "== Downloaded ${url} ==" + if [[ -n "${hash}" ]]; then + echo "== Downloaded ${url} (SHA1 = ${hash}) ==" + else + echo "== Downloaded ${url} ==" + fi + return fi - return - fi + done done echo "All downloads failed; sleeping before retrying"