From: Piotrek Zadroga Date: Tue, 17 Jun 2025 06:39:10 +0000 (+0200) Subject: [#3940] flags precedence tests X-Git-Tag: Kea-3.0.0~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f4c852739f73f474f2ded107c6bfdcde8d90c17;p=thirdparty%2Fkea.git [#3940] flags precedence tests --- diff --git a/src/bin/shell/tests/ca_basic_auth_tests.sh.in b/src/bin/shell/tests/ca_basic_auth_tests.sh.in index ce3da5798c..6dc570a664 100755 --- a/src/bin/shell/tests/ca_basic_auth_tests.sh.in +++ b/src/bin/shell/tests/ca_basic_auth_tests.sh.in @@ -207,3 +207,6 @@ shell_command_test "shell.bad-auth-password-file-content" \ shell_command_test "shell.good-auth-password-file-content" \ "--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "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.flag-precedence" \ + "--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \ + "Failed to run: HTTP Error 401: Unauthorized" diff --git a/src/bin/shell/tests/d2_basic_auth_tests.sh.in b/src/bin/shell/tests/d2_basic_auth_tests.sh.in index dd7ff4edff..8d2ff19ff1 100755 --- a/src/bin/shell/tests/d2_basic_auth_tests.sh.in +++ b/src/bin/shell/tests/d2_basic_auth_tests.sh.in @@ -212,3 +212,6 @@ shell_command_test "shell.bad-auth-password-file-content" \ shell_command_test "shell.good-auth-password-file-content" \ "--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "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.flag-precedence" \ + "--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \ + "Failed to run: HTTP Error 401: Unauthorized" diff --git a/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in b/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in index 087338fe10..89aa299eaf 100755 --- a/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in +++ b/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in @@ -239,3 +239,6 @@ shell_command_test "shell.bad-auth-password-file-content" \ shell_command_test "shell.good-auth-password-file-content" \ "--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "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\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-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.flag-precedence" \ + "--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \ + "Failed to run: HTTP Error 401: Unauthorized" diff --git a/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in b/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in index 906d583292..62778274f3 100755 --- a/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in +++ b/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in @@ -244,3 +244,6 @@ shell_command_test "shell.bad-auth-password-file-content" \ shell_command_test "shell.good-auth-password-file-content" \ "--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "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\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-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.flag-precedence" \ + "--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \ + "Failed to run: HTTP Error 401: Unauthorized"