From 3c1f2cb872b4620f09d948db7df31e22e3c246a3 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Fri, 5 Apr 2024 15:57:40 +0200 Subject: [PATCH] Get rid of wget and use curl instead of it Resolves: #93 Signed-off-by: Sergio Arroutbi --- Sanity/DAST_test/main.fmf | 2 +- Sanity/DAST_test/runtest.sh | 2 +- Setup/setup_local_cluster/main.fmf | 2 +- Setup/setup_local_cluster/runtest.sh | 7 +++---- TestHelpers/functions.sh | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Sanity/DAST_test/main.fmf b/Sanity/DAST_test/main.fmf index 86c394b..ea38ac2 100644 --- a/Sanity/DAST_test/main.fmf +++ b/Sanity/DAST_test/main.fmf @@ -9,7 +9,7 @@ recommend: - helm require+: - git - - wget + - curl - jq duration: 10m enabled: true diff --git a/Sanity/DAST_test/runtest.sh b/Sanity/DAST_test/runtest.sh index a452625..cf227d8 100755 --- a/Sanity/DAST_test/runtest.sh +++ b/Sanity/DAST_test/runtest.sh @@ -59,7 +59,7 @@ rlJournalStart # 3 - download configuration file template # WARNING: if tang-operator is changed to OpenShift organization, change this - rlRun "wget -O tang_operator.yaml https://raw.githubusercontent.com/latchset/tang-operator/main/tools/scan_tools/tang_operator_template.yaml" + rlRun "curl -o tang_operator.yaml https://raw.githubusercontent.com/latchset/tang-operator/main/tools/scan_tools/tang_operator_template.yaml" # 4 - adapt configuration file template (token, machine) if [ "${EXECUTION_MODE}" == "MINIKUBE" ]; diff --git a/Setup/setup_local_cluster/main.fmf b/Setup/setup_local_cluster/main.fmf index 2e05c1a..cc07965 100644 --- a/Setup/setup_local_cluster/main.fmf +++ b/Setup/setup_local_cluster/main.fmf @@ -10,7 +10,7 @@ tag: require+: - libvirt-daemon - podman - - wget + - curl duration: 5m enabled: true diff --git a/Setup/setup_local_cluster/runtest.sh b/Setup/setup_local_cluster/runtest.sh index 3c5bbac..7d1624a 100755 --- a/Setup/setup_local_cluster/runtest.sh +++ b/Setup/setup_local_cluster/runtest.sh @@ -27,11 +27,10 @@ rlJournalStart ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n "$(uname -m)" ;; esac) OS=$(uname | awk '{print tolower($0)}') #download latest operator - curl -s https://api.github.com/repos/operator-framework/operator-sdk/releases/latest \ + curl $(curl -s https://api.github.com/repos/operator-framework/operator-sdk/releases/latest \ | grep "operator-sdk_${OS}_${ARCH}" \ | cut -d : -f 2,3 \ -| tr -d \" \ -| wget -qi - +| tr -d '"') 2>/dev/null 1/dev/null rlRun "chmod +x operator-sdk_${OS}_${ARCH} && mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk" #setup of libvirt @@ -59,4 +58,4 @@ rlJournalStart rlPhaseEnd -rlJournalEnd \ No newline at end of file +rlJournalEnd diff --git a/TestHelpers/functions.sh b/TestHelpers/functions.sh index dfce067..5944634 100755 --- a/TestHelpers/functions.sh +++ b/TestHelpers/functions.sh @@ -127,7 +127,7 @@ dumpKeyAdv() { local url url="http://${ip}:${port}/${ADV_PATH}" local get_command1 - get_command1="wget ${url} --timeout=${TO_WGET_CONNECTION} -O ${file} -o /dev/null" + get_command1="curl ${url} --connect-timeout ${TO_WGET_CONNECTION} -o ${file} 1>/dev/null 2>/dev/null" ocpopLogVerbose "DUMP_KEY_ADV_COMMAND:[${get_command1}]" ${get_command1} }