Skip to content

Commit

Permalink
Add test for reporting on stopped pools
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Dec 5, 2023
1 parent 1ac5d94 commit b2bf57f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/whitebox/integration/pool/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

# isort: LOCAL
from stratis_cli import StratisCliErrorCodes
from stratis_cli._errors import StratisCliResourceNotFoundError

from .._misc import RUNNER, SimTestCase, device_name_list

Expand Down Expand Up @@ -49,6 +50,13 @@ def test_call_bad_uuid(self):
command_line = self._MENU + ["--uuid", str(uuid4())]
self.check_error(DbusClientUniqueResultError, command_line, _ERROR)

def test_call_bad_uuid_stopped(self):
"""
Test bad uuid for stopped pools.
"""
command_line = self._MENU + ["--stopped", "--uuid", str(uuid4())]
self.check_error(StratisCliResourceNotFoundError, command_line, _ERROR)

def test_report_bad_name(self):
"""
Test bad name.
Expand All @@ -58,3 +66,14 @@ def test_report_bad_name(self):
"noone",
]
self.check_error(DbusClientUniqueResultError, command_line, _ERROR)

def test_report_bad_name_stopped(self):
"""
Test bad name for stopped pools.
"""
command_line = self._MENU + [
"--stopped",
"--name",
"noone",
]
self.check_error(StratisCliResourceNotFoundError, command_line, _ERROR)

0 comments on commit b2bf57f

Please sign in to comment.