From 143dea18fe9bc2ebc65a8dbdcfa44d331adc161c Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 5 Aug 2020 17:59:35 -0400 Subject: [PATCH] Added negative test case for --list-sources option Negative test test_append_arguments_to_list_sources added to --list-sources Signed-off-by: Kaleemullah Siddiqui Reviewed-By: Mohammad Rizwan --- ipatests/test_integration/test_ipahealthcheck.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py index d78f62c16..8f5a89a0c 100644 --- a/ipatests/test_integration/test_ipahealthcheck.py +++ b/ipatests/test_integration/test_ipahealthcheck.py @@ -1590,3 +1590,16 @@ class TestIpaHealthCLI(IntegrationTest): ensure ABI compatibility. """ self.master.run_command(["pki-healthcheck"]) + + def test_append_arguments_to_list_sources(self): + """ + Verify that when arguments are specified to --list-sources + option, error is displayed on the console. + """ + cmd = self.base_cmd + ["--list-sources", "source"] + result = self.master.run_command(cmd, raiseonerr=False) + assert result.returncode == 2 + assert ( + "ipa-healthcheck: error: unrecognized arguments: source" + in result.stderr_text + )