Skip to content

Commit

Permalink
Get rid of wget and use curl instead of it (#100)
Browse files Browse the repository at this point in the history
Resolves: #93

Signed-off-by: Sergio Arroutbi <[email protected]>
  • Loading branch information
sarroutbi authored Apr 5, 2024
1 parent a7b5e46 commit 4162952
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sanity/DAST_test/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ recommend:
- helm
require+:
- git
- wget
- curl
- jq
duration: 10m
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion Sanity/DAST_test/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand Down
2 changes: 1 addition & 1 deletion Setup/setup_local_cluster/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tag:
require+:
- libvirt-daemon
- podman
- wget
- curl
duration: 5m
enabled: true

Expand Down
7 changes: 3 additions & 4 deletions Setup/setup_local_cluster/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,4 +58,4 @@ rlJournalStart
rlPhaseEnd


rlJournalEnd
rlJournalEnd
2 changes: 1 addition & 1 deletion TestHelpers/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down

0 comments on commit 4162952

Please sign in to comment.