diff --git a/tests/whitebox/integration/test_parser.py b/tests/whitebox/integration/test_parser.py index 5368db876..6839da3d7 100644 --- a/tests/whitebox/integration/test_parser.py +++ b/tests/whitebox/integration/test_parser.py @@ -118,6 +118,36 @@ def test_explain_non_existent_code(self): for prefix in [[], ["--propagate"]]: self.check_system_exit(prefix + command_line, _PARSE_ERROR) + def test_create_with_clevis_1(self): + """ + Test parsing when creating a pool w/ clevis tang but no URL. + """ + command_line = [ + "--propagate", + "pool", + "create", + "--clevis=tang", + "pn", + "/dev/n", + ] + self.check_error(StratisCliMissingClevisTangURLError, command_line, 1) + + def test_create_with_clevis_2(self): + """ + Test parsing when creating a pool w/ clevis tang, a URL, but no + thumbprint or trust-url. + """ + command_line = [ + "--propagate", + "pool", + "create", + "--clevis=tang", + "--tang-url=url", + "pn", + "/dev/n", + ] + self.check_error(StratisCliMissingClevisThumbprintError, command_line, 1) + class TestFilesystemSizeParsing(RunTestCase): """ @@ -250,33 +280,3 @@ def test_stratis_list_default(self): for subcommand in [["pool"], ["filesystem"], ["blockdev"]]: for prefix in [[], ["--propagate"]]: self.assertEqual(RUNNER(prefix + subcommand), 0) - - def test_create_with_clevis_1(self): - """ - Test parsing when creating a pool w/ clevis tang but no URL. - """ - command_line = [ - "--propagate", - "pool", - "create", - "--clevis=tang", - "pn", - "/dev/n", - ] - self.check_error(StratisCliMissingClevisTangURLError, command_line, 1) - - def test_create_with_clevis_2(self): - """ - Test parsing when creating a pool w/ clevis tang, a URL, but no - thumbprint or trust-url. - """ - command_line = [ - "--propagate", - "pool", - "create", - "--clevis=tang", - "--tang-url=url", - "pn", - "/dev/n", - ] - self.check_error(StratisCliMissingClevisThumbprintError, command_line, 1)