From: Tomek Mrugalski Date: Mon, 11 Aug 2014 14:58:53 +0000 (+0200) Subject: [3508] Unit-tests added for version reporting. X-Git-Tag: trac3482_base~46^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bf7b6c48ef5f4e480a162dc6f636beb48f93b46;p=thirdparty%2Fkea.git [3508] Unit-tests added for version reporting. --- diff --git a/src/bin/d2/tests/d2_process_tests.sh.in b/src/bin/d2/tests/d2_process_tests.sh.in index 659caca8b4..a9c19dad11 100755 --- a/src/bin/d2/tests/d2_process_tests.sh.in +++ b/src/bin/d2/tests/d2_process_tests.sh.in @@ -16,6 +16,8 @@ CFG_FILE=@abs_top_builddir@/src/bin/d2/tests/test_config.json # Path to the D2 log file. LOG_FILE=@abs_top_builddir@/src/bin/d2/tests/test.log +# Expected version +EXPECTED_VERSION="@PACKAGE_VERSION@" # D2 configuration to be stored in the configuration file. CONFIG="{ \"DhcpDdns\": @@ -236,3 +238,4 @@ shutdown_test() { dynamic_reconfiguration_test shutdown_test "dhcp-ddns.sigterm_test" 15 shutdown_test "dhcp-ddns.sigint_test" 2 +version_test "dhcp-ddns.version" diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 0644237e9b..27d1a0ee94 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -351,9 +351,10 @@ core component within the DHCPv4 server (the Dhcpv4 server object) has failed. As a result, the server will exit. The reason for the failure is given within the message. -% DHCP4_STARTING server starting +% DHCP4_STARTING Kea DHCPv4 server version %1 starting This informational message indicates that the DHCPv4 server has -processed any command-line switches and is starting. +processed any command-line switches and is starting. The version +is also printed. % DHCP4_START_INFO pid: %1, port: %2, verbose: %3 This is a debug message issued during the DHCPv4 server startup. diff --git a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in index 40967bf7ff..af5f5f0943 100755 --- a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in +++ b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in @@ -16,6 +16,8 @@ CFG_FILE=@abs_top_builddir@/src/bin/dhcp4/tests/test_config.json # Path to the Kea log file. LOG_FILE=@abs_top_builddir@/src/bin/dhcp4/tests/test.log +# Expected version +EXPECTED_VERSION="@PACKAGE_VERSION@" # Kea configuration to be stored in the configuration file. CONFIG="{ \"Dhcp4\": @@ -256,3 +258,4 @@ shutdown_test() { dynamic_reconfiguration_test shutdown_test "dhcpv4.sigterm_test" 15 shutdown_test "dhcpv4.sigint_test" 2 +version_test "dhcpv4.version" diff --git a/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in b/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in index 54ee7e709a..b972774352 100755 --- a/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in +++ b/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in @@ -16,6 +16,8 @@ CFG_FILE=@abs_top_builddir@/src/bin/dhcp6/tests/test_config.json # Path to the Kea log file. LOG_FILE=@abs_top_builddir@/src/bin/dhcp6/tests/test.log +# Expected version +EXPECTED_VERSION="@PACKAGE_VERSION@" # Kea configuration to be stored in the configuration file. CONFIG="{ \"Dhcp6\": @@ -257,5 +259,6 @@ shutdown_test() { } dynamic_reconfiguration_test -shutdown_test "dhcpv4.sigterm_test" 15 -shutdown_test "dhcpv4.sigint_test" 2 +shutdown_test "dhcpv6.sigterm_test" 15 +shutdown_test "dhcpv6.sigint_test" 2 +version_test "dhcpv6.version" diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in index a0b6f0e2ff..ca10b503f6 100644 --- a/src/bin/keactrl/keactrl.in +++ b/src/bin/keactrl/keactrl.in @@ -284,7 +284,7 @@ case ${command} in args="-c ${kea_config_file}" if [ "${kea_verbose}" = "yes" ]; then - args="${args} -v" + args="${args} -d" fi # Run servers if they are on the list of servers from the command line