Skip to content

Commit

Permalink
Fix OMAP lock test.
Browse files Browse the repository at this point in the history
Fixes ceph#327

Signed-off-by: Gil Bregman <[email protected]>
  • Loading branch information
gbregman committed Nov 22, 2023
1 parent 2acfd4a commit 7c44981
Show file tree
Hide file tree
Showing 3 changed files with 283 additions and 128 deletions.
9 changes: 9 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ def test_create_bdev_ana_ipv6(self, caplog, gateway):

def test_create_subsystem_ana(self, caplog, gateway):
caplog.clear()
with pytest.raises(Exception) as ex:
try:
cli(["create_subsystem", "-n", subsystem, "-t"])
except SystemExit as sysex:
# should fail with non-zero return code
assert sysex != 0
pass
assert "HA enabled but ANA-reporting is disabled" in str(ex.value)
caplog.clear()
cli(["create_subsystem", "-n", subsystem, "-a", "-t"])
assert f"Created subsystem {subsystem}: True" in caplog.text
assert "ana reporting: True" in caplog.text
Expand Down
2 changes: 1 addition & 1 deletion tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_create_get_subsys(caplog, config):

for i in range(created_resource_count):
create_resource_by_index(i)
assert "Failed" not in caplog.text
assert "failed" not in caplog.text.lower()

caplog.clear()

Expand Down
Loading

0 comments on commit 7c44981

Please sign in to comment.