Skip to content

Commit

Permalink
stratis_cli_cert: Add tests for setting filesystem size limit
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Oct 23, 2023
1 parent 61b5e82 commit 60f7e61
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions stratis_cli_cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,48 @@ def test_filesystem_create_specified_size_limit_toosmall(self):
True,
)

@skip(_skip_condition(1))
def test_filesystem_set_size_limit(self):
"""
Test setting a size limit on an existing filesystem.
"""
pool_name = make_test_pool(StratisCliCertify.DISKS[0:1])
filesystem_name = make_test_filesystem(pool_name)
self._unittest_command(
[
_STRATIS_CLI,
"filesystem",
"set-size-limit",
pool_name,
filesystem_name,
"2TiB",
],
0,
True,
True,
)

@skip(_skip_condition(1))
def test_filesystem_set_size_limit_toosmall(self):
"""
Test setting a size limit on an existing filesystem that is too small.
"""
pool_name = make_test_pool(StratisCliCertify.DISKS[0:1])
filesystem_name = make_test_filesystem(pool_name)
self._unittest_command(
[
_STRATIS_CLI,
"filesystem",
"set-size-limit",
pool_name,
filesystem_name,
"1048572MiB",
],
1,
False,
True,
)

@skip(_skip_condition(1))
def test_filesystem_create_permissions(self):
"""
Expand Down

0 comments on commit 60f7e61

Please sign in to comment.