Skip to content

Commit

Permalink
Merge pull request #109 from nathanielvarona/automation-reachability-…
Browse files Browse the repository at this point in the history
…test-default-ping-count

Reachability Test Default Ping Count
  • Loading branch information
nathanielvarona authored Oct 24, 2023
2 parents 35ca9cd + b8235bc commit 769c1e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/connection-tests-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ jobs:
run: |
# VPN Gateway Reachability Test
ping_count_number=5
profile_ip=$(pritunl-client list -j | jq ". | sort_by(.name)" | jq ".[0]" | jq -r ".client_address")
vpn_gateway="$(ipcalc $profile_ip | awk 'NR==6{print $2}')"
ping_flags="$([[ "$RUNNER_OS" == "Windows" ]] && echo "-n 10" || echo "-c 10")"
ping_flags="$([[ "$RUNNER_OS" == "Windows" ]] && echo "-n $ping_count_number" || echo "-c $ping_count_number")"
# Ping VPN Gateway
ping $vpn_gateway $ping_flags
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ You can use the full profile name as well, it is also acceptable.
echo "ipcalc version $(ipcalc --version)"
# VPN Gateway Reachability Test
ping_count_number=5
profile_ip=$(pritunl-client list -j | jq -r 'sort_by(.name) | .[0].client_address')
vpn_gateway="$(ipcalc $profile_ip | awk 'NR==6{print $2}')"
ping_flags="$([[ "$RUNNER_OS" == "Windows" ]] && echo "-n 10" || echo "-c 10")"
ping_flags="$([[ "$RUNNER_OS" == "Windows" ]] && echo "-n $ping_count_number" || echo "-c $ping_count_number")"
# Ping VPN Gateway
ping $vpn_gateway $ping_flags
Expand Down

0 comments on commit 769c1e3

Please sign in to comment.