From e15e6b790535dc8a80f43237a1ab309e3f68d365 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 26 Feb 2024 22:45:43 +0100 Subject: [PATCH] augments local_ping_echo.sh with test for correct number of bundles in store --- tests/local_ping_echo.sh | 15 +++++++++++++++ tests/store_delete_singleton.sh | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/local_ping_echo.sh b/tests/local_ping_echo.sh index f0cbebc6..0fc1436e 100755 --- a/tests/local_ping_echo.sh +++ b/tests/local_ping_echo.sh @@ -21,6 +21,21 @@ $BINS/examples/dtnping -d 'dtn://node1/echo' -c 6 -t 500ms RC=$? echo "RET: $RC" +echo -n "Bundles in store on node 1: " +NUM_BUNDLES=$($BINS/dtnquery bundles | grep "dtn://" | wc -l | awk '{print $1}') +echo -n $NUM_BUNDLES + +EXPECTED_BUNDLES=0 + +echo " / $EXPECTED_BUNDLES" +if [ "$NUM_BUNDLES" = "$EXPECTED_BUNDLES" ]; then + echo "Correct number of bundles in store!" +else + echo "Incorrect number of bundles in store!" + RC=1 +fi + + wait_for_key $1 #kill $PID_ECHO1 diff --git a/tests/store_delete_singleton.sh b/tests/store_delete_singleton.sh index bfdf2ab8..c76e2fb9 100755 --- a/tests/store_delete_singleton.sh +++ b/tests/store_delete_singleton.sh @@ -31,7 +31,9 @@ if [ "$NUM_BUNDLES" = "$EXPECTED_BUNDLES" ]; then echo "Correct number of bundles in store!" else echo "Incorrect number of bundles in store!" - + wait_for_key $1 + cleanup + exit 1 fi echo