Skip to content

Commit

Permalink
systemtest: modified test_list_command to correctly remove test volume
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri committed Feb 11, 2022
1 parent 56a10bb commit 201e4fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions systemtests/tests/python-bareos/test_list_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,18 @@ def test_list_media(self):
)

# check expected behavior when asking for specific volume by name
director.call("label volume=test_volume0001 pool=Full")
test_volume = "test_volume0001"
director.call("label volume={} pool=Full".format(test_volume))
director.call("wait")
result = director.call("list media=test_volume0001")
self.assertEqual(
result["volume"]["volumename"],
"test_volume0001",
test_volume,
)
result = director.call("list volume=test_volume0001")
result = director.call("list volume={}".format(test_volume))
self.assertEqual(
result["volume"]["volumename"],
"test_volume0001",
test_volume,
)

# check expected behavior when asking for specific volume by mediaid
Expand All @@ -314,6 +315,7 @@ def test_list_media(self):
"2",
)
director.call("delete volume=test_volume0001 yes")
os.remove("storage/{}".format(test_volume))

def test_list_pool(self):
"""
Expand Down

0 comments on commit 201e4fc

Please sign in to comment.