From: Christian Herdtweck Date: Fri, 20 Mar 2015 10:12:15 +0000 (+0100) Subject: fixed trouble in unittests: when I changed/added options I forgot to adjust correspon... X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=c491166272af3bac4a1853afe14408205ee60407;p=pingcheck fixed trouble in unittests: when I changed/added options I forgot to adjust corresponding unittests --- diff --git a/test/test_configurationoptions.cpp b/test/test_configurationoptions.cpp index 441927e..f545c59 100644 --- a/test/test_configurationoptions.cpp +++ b/test/test_configurationoptions.cpp @@ -120,8 +120,9 @@ BOOST_AUTO_TEST_CASE( get_configuration_options ) std::vector< option_description_item > options = config_options.get_configuration_options().options(); // if this assert fails, you must add or remove one of the options in the - // test bellow - BOOST_CHECK_EQUAL( options.size(), 12 ); + // test below. Will probably find them all in + // src/config/configurationoptions.cpp constructor + BOOST_CHECK_EQUAL( options.size(), 16 ); BOOST_CHECK_EQUAL( option_present( options, "hosts-down-limit" ), true ); BOOST_CHECK_EQUAL( option_present( options, "link-down-interval" ), true ); @@ -130,6 +131,10 @@ BOOST_AUTO_TEST_CASE( get_configuration_options ) BOOST_CHECK_EQUAL( option_present( options, "ping-fail-limit" ), true ); BOOST_CHECK_EQUAL( option_present( options, "default-source-network-interface" ), true ); BOOST_CHECK_EQUAL( option_present( options, "status-notifier-cmd" ), true ); + BOOST_CHECK_EQUAL( option_present( options, "ping-reply-timeout" ), true ); + BOOST_CHECK_EQUAL( option_present( options, "max-address-resolution-attempts" ), true ); + BOOST_CHECK_EQUAL( option_present( options, "resolved-ip-ttl-threshold" ), true ); + BOOST_CHECK_EQUAL( option_present( options, "ratio-random-hosts" ), true ); BOOST_CHECK_EQUAL( option_present( options, "host.name" ), true ); BOOST_CHECK_EQUAL( option_present( options, "host.port" ), true ); BOOST_CHECK_EQUAL( option_present( options, "host.source-network-interface" ), true ); @@ -187,43 +192,43 @@ BOOST_AUTO_TEST_CASE( parse_hosts_options ) std::vector hosts_ports; std::vector hosts_source_interfaces; std::vector hosts_ping_protocols; - std::vector hosts_intervals; + std::vector hosts_intervals; // host 1 hosts_names.push_back( "www.fazenda.gov.br" ); hosts_ports.push_back( 61 ); hosts_source_interfaces.push_back( "eth1" ); hosts_ping_protocols.push_back( "TCP" ); - hosts_intervals.push_back( 71 ); + hosts_intervals.push_back( "71" ); // host 2 hosts_names.push_back( "www.intra2net.de" ); hosts_ports.push_back( 62 ); hosts_source_interfaces.push_back( "eth2" ); hosts_ping_protocols.push_back( "ICMP" ); - hosts_intervals.push_back( 72 ); + hosts_intervals.push_back( "72" ); // host 3 hosts_names.push_back( "www.ufsc.br" ); hosts_ports.push_back( 63 ); hosts_source_interfaces.push_back( "eth3" ); hosts_ping_protocols.push_back( "ICMPv6" ); - hosts_intervals.push_back( 73 ); + hosts_intervals.push_back( "73" ); // host 4 hosts_names.push_back( "www.google.com" ); hosts_ports.push_back( 64 ); hosts_source_interfaces.push_back( "eth4" ); hosts_ping_protocols.push_back( "TCP_IPv6" ); - hosts_intervals.push_back( 74 ); + hosts_intervals.push_back( "74" ); // host 5 hosts_names.push_back( "www.kernel.org" ); hosts_ports.push_back( 64 ); hosts_source_interfaces.push_back( "eth5" ); hosts_ping_protocols.push_back( "TCP_IPv4,ICMPv4" ); - hosts_intervals.push_back( 75 ); + hosts_intervals.push_back( "75" ); // host 6 hosts_names.push_back( "www.linux.com" ); hosts_ports.push_back( 64 ); hosts_source_interfaces.push_back( "eth6" ); hosts_ping_protocols.push_back( "ICMPv6,TCP_IPv6" ); - hosts_intervals.push_back( 76 ); + hosts_intervals.push_back( "76" ); ConfigurationOptions config_options; Configuration configuration;