From: Andrei Pavel Date: Tue, 11 Nov 2025 08:55:47 +0000 (+0200) Subject: [#4159] Remove duplicated version tests X-Git-Tag: Kea-3.1.4~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fcc86c95e47fdc3ae7d5ab309ec8078eae6af93;p=thirdparty%2Fkea.git [#4159] Remove duplicated version tests --- diff --git a/src/bin/shell/tests/shell_ca_process_tests.sh.in b/src/bin/shell/tests/shell_ca_process_tests.sh.in index 952bfcf69a..8fef4c6bc6 100755 --- a/src/bin/shell/tests/shell_ca_process_tests.sh.in +++ b/src/bin/shell/tests/shell_ca_process_tests.sh.in @@ -164,25 +164,6 @@ shell_command_test() { test_finish 0 } -# This test verifies that the binary is reporting its version properly. -version_test() { - test_name=${1} # Test name - - # Log the start of the test and print test name. - test_start "${test_suite}-${test_name}" - - REPORTED_VERSION=$(${shell_bin_path}/${shell_bin} -v) - - if test "${REPORTED_VERSION}" = "${EXPECTED_VERSION}"; then - test_finish 0 - else - echo "ERROR:" \ - "Expected version ${EXPECTED_VERSION}, got ${REPORTED_VERSION}" - test_finish 1 - fi -} - -version_test "shell.version" shell_command_test "shell.list-commands" "list-commands" \ "[ { \"arguments\": [ \"build-report\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"list-commands\", \"shutdown\", \"status-get\", \"version-get\" ], \"result\": 0 } ]" "" shell_command_test "shell.bogus" "give-me-a-beer" \ diff --git a/src/bin/shell/tests/shell_d2_process_tests.sh.in b/src/bin/shell/tests/shell_d2_process_tests.sh.in index 902af94806..8547c7c559 100755 --- a/src/bin/shell/tests/shell_d2_process_tests.sh.in +++ b/src/bin/shell/tests/shell_d2_process_tests.sh.in @@ -169,25 +169,6 @@ shell_command_test() { test_finish 0 } -# This test verifies that the binary is reporting its version properly. -version_test() { - test_name=${1} # Test name - - # Log the start of the test and print test name. - test_start "${test_suite}-${test_name}" - - REPORTED_VERSION=$(${shell_bin_path}/${shell_bin} -v) - - if test "${REPORTED_VERSION}" = "${EXPECTED_VERSION}"; then - test_finish 0 - else - echo "ERROR:" \ - "Expected version ${EXPECTED_VERSION}, got ${REPORTED_VERSION}" - test_finish 1 - fi -} - -version_test "shell.version" shell_command_test "shell.list-commands" "list-commands" \ "[ { \"arguments\": [ \"build-report\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"list-commands\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-reset\", \"statistic-reset-all\", \"status-get\", \"version-get\" ], \"result\": 0 } ]" "" shell_command_test "shell.bogus" "give-me-a-beer" \ diff --git a/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in b/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in index 2aac3d39a1..243670b62f 100755 --- a/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in +++ b/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in @@ -194,25 +194,6 @@ shell_command_test() { test_finish 0 } -# This test verifies that the binary is reporting its version properly. -version_test() { - test_name=${1} # Test name - - # Log the start of the test and print test name. - test_start "${test_suite}-${test_name}" - - REPORTED_VERSION=$(${shell_bin_path}/${shell_bin} -v) - - if test "${REPORTED_VERSION}" = "${EXPECTED_VERSION}"; then - test_finish 0 - else - echo "ERROR:" \ - "Expected version ${EXPECTED_VERSION}, got ${REPORTED_VERSION}" - test_finish 1 - fi -} - -version_test "shell.version" shell_command_test "shell.list-commands" "list-commands" \ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"kea-lfc-start\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]" "" shell_command_test "shell.bogus" "give-me-a-beer" \ diff --git a/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in b/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in index 94c4819af0..7948e4ebe6 100755 --- a/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in +++ b/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in @@ -199,25 +199,6 @@ shell_command_test() { test_finish 0 } -# This test verifies that the binary is reporting its version properly. -version_test() { - test_name=${1} # Test name - - # Log the start of the test and print test name. - test_start "${test_suite}-${test_name}" - - REPORTED_VERSION=$(${shell_bin_path}/${shell_bin} -v) - - if test "${REPORTED_VERSION}" = "${EXPECTED_VERSION}"; then - test_finish 0 - else - echo "ERROR:" \ - "Expected version ${EXPECTED_VERSION}, got ${REPORTED_VERSION}" - test_finish 1 - fi -} - -version_test "shell.version" shell_command_test "shell.list-commands" "list-commands" \ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"kea-lfc-start\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]" "" shell_command_test "shell.bogus" "give-me-a-beer" \