From ad028c555d8517091b60bf9aff97fa0ab22a93ac Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Wed, 23 Sep 2015 23:18:16 +0100 Subject: Don't attempt to run tests unless start file is successful --- apps/files_external/tests/env/start-smb-windows.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/files_external/tests') diff --git a/apps/files_external/tests/env/start-smb-windows.sh b/apps/files_external/tests/env/start-smb-windows.sh index 2143d7e7499..6779cdb2d56 100755 --- a/apps/files_external/tests/env/start-smb-windows.sh +++ b/apps/files_external/tests/env/start-smb-windows.sh @@ -19,6 +19,12 @@ user=smb-test password=!owncloud123 host=WIN-9GTFAS08C15 +if ! (nc -c -w 1 ${host} 445 &/dev/null \ + || nc -w 1 ${host} 445 &/dev/null); then + echo "[ERROR] Server not reachable" >&2 + exit 1 +fi + cat > $thisFolder/config.smb.php <