Skip to content

Commit

Permalink
Add some tests for complete coverage
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Dec 20, 2024
1 parent e25a463 commit 4f2fd7c
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions tests/whitebox/integration/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,48 @@ def test_create_with_post_parser_set(self):
for prefix in [[], ["--propagate"]]:
self.check_system_exit(prefix + command_line, _PARSE_ERROR)

def test_create_with_oversize_tag_value(self):
def test_create_with_bad_tag_value(self):
"""
Verify that a tag value of at least 256B will result in a parser error.
Verify that an unrecognized tag value causes an error.
"""
command_line = [
"pool",
"create",
"pn",
"/dev/n",
"--tag-size=256B",
"--tag-spec=512",
]
for prefix in [[], ["--propagate"]]:
self.check_system_exit(prefix + command_line, _PARSE_ERROR)

def test_create_with_integrity_no_journal_size(self):
"""
Verify that creating with integrity = no plus good journal-size
results in a parse error.
"""
command_line = [
"pool",
"create",
"pn",
"/dev/n",
"--integrity=no",
"--journal-size=128MiB",
]
for prefix in [[], ["--propagate"]]:
self.check_system_exit(prefix + command_line, _PARSE_ERROR)

def test_create_with_integrity_no_tag_spec(self):
"""
Verify that creating with integrity = no plus good journal-size
results in a parse error.
"""
command_line = [
"pool",
"create",
"pn",
"/dev/n",
"--integrity=no",
"--tag-spec=32b",
]
for prefix in [[], ["--propagate"]]:
self.check_system_exit(prefix + command_line, _PARSE_ERROR)
Expand Down

0 comments on commit 4f2fd7c

Please sign in to comment.