From: Guilherme Maciel Ferreira Date: Thu, 2 Feb 2012 00:32:15 +0000 (-0200) Subject: Test: added --daemon option to ConfigurationCommandLine test case. X-Git-Tag: v1.3~11^2~21 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=8a8f3cea36cba5dad6c72a2f78eac150b8007119;p=pingcheck Test: added --daemon option to ConfigurationCommandLine test case. --- diff --git a/test/test_configurationcommandline.cpp b/test/test_configurationcommandline.cpp index 60f8120..25dc474 100644 --- a/test/test_configurationcommandline.cpp +++ b/test/test_configurationcommandline.cpp @@ -32,9 +32,10 @@ BOOST_AUTO_TEST_SUITE( TestConfigurationCommandLine ) BOOST_AUTO_TEST_CASE( normal_options ) { - const int argc = 17; + const int argc = 18; char *argv[argc] = { "./pingcheck", + "--daemon", "--config-file=conf/config_file.conf", "--source-network-interface=eth0", "--nameserver=localhost", @@ -43,12 +44,12 @@ BOOST_AUTO_TEST_CASE( normal_options ) "--status-notifier-cmd=scripts/notifier_command.sh", "--link-up-interval=10", "--link-down-interval=10", - // 1st host1 + // 1st host "--host.name=www.intra2net.com", "--host.port=80", "--host.interval=4000", "--host.ping-protocol=TCP", - // 2nd host1 + // 2nd host "--host.name=www.ufsc.br", "--host.port=25", "--host.interval=1000", @@ -64,6 +65,7 @@ BOOST_AUTO_TEST_CASE( normal_options ) BOOST_CHECK_EQUAL( command_line_processed, true ); BOOST_CHECK_EQUAL( command_line_parsed, true ); + BOOST_CHECK_EQUAL( config.get_daemon(), true ); BOOST_CHECK_EQUAL( config.get_config_file_name(), "conf/config_file.conf" ); BOOST_CHECK_EQUAL( config.get_source_network_interface(), "eth0" ); BOOST_CHECK_EQUAL( config.get_nameserver(), "localhost" );