Add Nack handling to CS freshness test and localhop test
Bring implementation of localhop test in line with design
refs #3692
Change-Id: I40c49b68b03aa1996e5546465daaccc18e29853e
diff --git a/test_cs_freshness/cs-freshness-test.sh b/test_cs_freshness/cs-freshness-test.sh
index 65a0496..82e647b 100755
--- a/test_cs_freshness/cs-freshness-test.sh
+++ b/test_cs_freshness/cs-freshness-test.sh
@@ -41,16 +41,16 @@
output=$(grep 'Total Interests Received' logs/server.log | head -1 | cut -d = -f2 | cut -d' ' -f2)
if [[ $output != '1' ]]
then
- echo "FAIL: Expected ndn-traffic-server receives 1 interest. Actual: $output"
+ echo "FAIL: Expected ndn-traffic-server to receive 1 interest. Actual: $output"
clean_up
exit 3
fi
-# Invoke ndnpeek to send Interest `ndn:/test-caching/A`, MustBeFresh=yes. Fail if this Interest is answered.
+# Invoke ndnpeek to send Interest `ndn:/test-caching/A`, MustBeFresh=yes. Fail if this Interest is answered with Data.
output=$(ndnpeek -fp ndn:/test-caching/A)
-if [[ ! -z $output ]]
+if [[ $? == "0" ]]
then
- echo "FAIL: Expected no data received for third interest. Actual data received: '$output'"
+ echo "FAIL: Expected no data to be received in response to third interest. Received: '$output'"
clean_up
exit 4
fi