Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ping tests. #53

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions fw-tools/edge-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ test_lwm2m() {

if [ -z "$RESULT" ]; then
clihelp::failure "openssl failed with: $(cat "$LWT")"
exit
fi
# print result
CODE=$(echo "$RESULT" | awk -F' ' '{print $4}')
Expand Down Expand Up @@ -196,7 +195,7 @@ test_registry() {

test_L3() {
_url() {
if [[ $(ping -q -c 1 "$1" >>"$L3T" 2>&1) -eq 0 ]]; then
if ping -q -c 1 "$1" >>"$L3T" 2>&1; then
clihelp::success "ping $1"
else
clihelp::failure "ping $1"
Expand All @@ -221,8 +220,8 @@ test_L3() {
}

test_L4() {
_nc() {
if [[ $(nc -v -w 1 "$1" "$2" >>"$L4T" 2>&1) -eq 0 ]]; then
_nc(){
if nc -v -w 1 "$1" "$2" >>"$L4T" 2>&1; then
clihelp::success "netcat $1 $2"
else
clihelp::failure "netcat $1 $2"
Expand Down
Loading