diff --git a/tests/full-test b/tests/full-test index 967753e6..5fd0dbec 100755 --- a/tests/full-test +++ b/tests/full-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/kerberos-test b/tests/kerberos-test index 1a485255..65c6caa9 100755 --- a/tests/kerberos-test +++ b/tests/kerberos-test @@ -56,7 +56,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" $DOCKER inspect $IMAGE_NAME diff --git a/tests/otp-test b/tests/otp-test index 32e762d0..47e69d42 100755 --- a/tests/otp-test +++ b/tests/otp-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/pam-noauth-test b/tests/pam-noauth-test index 95e6cb32..71a9fc9d 100755 --- a/tests/pam-noauth-test +++ b/tests/pam-noauth-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/pam-test b/tests/pam-test index 31e6a957..c74626ec 100755 --- a/tests/pam-test +++ b/tests/pam-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/proxyproto-test b/tests/proxyproto-test index 0aaa916b..792db00d 100755 --- a/tests/proxyproto-test +++ b/tests/proxyproto-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/proxyproto-unix-test b/tests/proxyproto-unix-test index 44894a68..fa73627d 100755 --- a/tests/proxyproto-unix-test +++ b/tests/proxyproto-unix-test @@ -43,7 +43,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/radius-test b/tests/radius-test index 832fd5c1..aca65002 100755 --- a/tests/radius-test +++ b/tests/radius-test @@ -45,7 +45,7 @@ echo "ocserv image was run" #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect $IMAGE_NAME | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop diff --git a/tests/unix-test b/tests/unix-test index e21eb2b5..a770b879 100755 --- a/tests/unix-test +++ b/tests/unix-test @@ -42,7 +42,7 @@ fi #wait for ocserv to server sleep 5 -IP=`$DOCKER inspect test_unix | grep IPAddress | cut -d '"' -f 4` +get_ip if test -z "$IP";then echo "Detected IP is null!" stop