Skip to content

Commit

Permalink
augments local_ping_echo.sh with test for correct number of bundles i…
Browse files Browse the repository at this point in the history
…n store
  • Loading branch information
teschmitt committed Feb 26, 2024
1 parent 573323f commit e15e6b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions tests/local_ping_echo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/store_delete_singleton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e15e6b7

Please sign in to comment.