summaryrefslogtreecommitdiff
path: root/contrib/cirrus/networking.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-16 23:22:52 +0200
committerGitHub <noreply@github.com>2019-08-16 23:22:52 +0200
commit8eab96ec3afdc04c02b5ea1c2067e4a36c14c783 (patch)
tree8cd21c11eaaa18d99ab79b4c5287238500cb2dd0 /contrib/cirrus/networking.sh
parent704cc582ac37fbbb7c8241a1cc09540f4976ed12 (diff)
parent122f694159a8d78f11e88f7f50e4a0d79c1718c6 (diff)
downloadpodman-8eab96ec3afdc04c02b5ea1c2067e4a36c14c783.tar.gz
podman-8eab96ec3afdc04c02b5ea1c2067e4a36c14c783.tar.bz2
podman-8eab96ec3afdc04c02b5ea1c2067e4a36c14c783.zip
Merge pull request #3832 from cevich/more_net
Cirrus: Confirm networking more
Diffstat (limited to 'contrib/cirrus/networking.sh')
-rwxr-xr-xcontrib/cirrus/networking.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/cirrus/networking.sh b/contrib/cirrus/networking.sh
new file mode 100755
index 000000000..aeaf74035
--- /dev/null
+++ b/contrib/cirrus/networking.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# This script attempts basic confirmation of functional networking
+# by connecting to a set of essential external servers and failing
+# if any cannot be reached.
+
+source $(dirname $0)/lib.sh
+
+while read host port
+do
+ if [[ "$port" -eq "443" ]]
+ then
+ item_test "SSL/TLS to $host:$port" "$(echo -n '' | openssl s_client -quiet -no_ign_eof -connect $host:$port &> /dev/null; echo $?)" -eq "0"
+ else
+ item_test "Connect to $host:$port" "$(nc -zv -w 13 $host $port &> /dev/null; echo $?)" -eq 0
+ fi
+done < ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/required_host_ports.txt