From 573c1f9a0ba41b7ffa45f36e05b7f50aae3fb1ec Mon Sep 17 00:00:00 2001 From: Bui Nguyen Quoc Thanh Date: Fri, 13 Mar 2020 15:30:39 +0700 Subject: Unittest: Update testcase gtest_dlt_daemon_gateway is updated to test for both cases: "With and Without General section in dlt_gateway.conf" Timeout=0 is now endless retry. So change it to "-1" Signed-off-by: Bui Nguyen Quoc Thanh --- tests/gtest_dlt_daemon_gateway.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/gtest_dlt_daemon_gateway.sh') diff --git a/tests/gtest_dlt_daemon_gateway.sh b/tests/gtest_dlt_daemon_gateway.sh index d74f519..4d952e5 100755 --- a/tests/gtest_dlt_daemon_gateway.sh +++ b/tests/gtest_dlt_daemon_gateway.sh @@ -153,6 +153,13 @@ setupTest() echo "Error in creating dlt_gateway file" return 1 fi + + if [ $# -eq 1 ] && [ "$1" == "1" ] + then + echo "[General]" >>$tmpPath/dlt_gateway.conf + echo "Interval=1">>$tmpPath/dlt_gateway.conf + fi + echo "[PassiveNode1]" >>$tmpPath/dlt_gateway.conf echo "IPaddress=$ipaddr">>$tmpPath/dlt_gateway.conf echo "Port=3490" >>$tmpPath/dlt_gateway.conf @@ -235,7 +242,14 @@ then fi echo "Initializing test" -setupTest + +if [ $# -eq 1 ] && [ "$1" == "-w" ] +then + echo "Including General section in dlt_gateway.conf" + setupTest 1 +else + setupTest +fi if [ $? -ne '0' ] then -- cgit v1.2.1