From 5019c4cebe485e6030c4cc365b6bd058435ca691 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 1 Dec 2014 23:08:12 +0100 Subject: [PATCH] tests: try to check stats only when file is present --- tests/full-test | 7 ++++--- tests/unix-test | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/full-test b/tests/full-test index 91e795c1..8cf23986 100755 --- a/tests/full-test +++ b/tests/full-test @@ -175,10 +175,11 @@ $DOCKER cp test_ocserv:/tmp/disconnect/ok ./ if ! test -f ./ok;then echo "Don't know if stats were received" ret=77 +else + echo -n "stats: " + echo `cat ./ok` + rm -f ./ok fi -echo -n "stats: " -echo `cat ./ok` -rm -f ./ok $DOCKER stop test_ocserv $DOCKER rm test_ocserv diff --git a/tests/unix-test b/tests/unix-test index f30044fb..ece4a5bc 100755 --- a/tests/unix-test +++ b/tests/unix-test @@ -175,10 +175,11 @@ $DOCKER cp test_unix:/tmp/disconnect/ok ./ if ! test -f ./ok;then echo "Don't know if stats were received" ret=77 +else + echo -n "stats: " + echo `cat ./ok` + rm -f ./ok fi -echo -n "stats: " -echo `cat ./ok` -rm -f ./ok $DOCKER stop test_unix $DOCKER rm test_unix