Skip to content

Commit

Permalink
Unit tests: Add simple pytest test for bugtool.disk_list()
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Jan 8, 2024
1 parent 33a45f5 commit 18c8fdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/test_fs_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ def test_read_inventory(bugtool, dom0_template):

inventory = bugtool.readKeyValueFile(dom0_template + bugtool.XENSOURCE_INVENTORY)
assert inventory["PRODUCT_VERSION"] == "8.3.0"


def test_disk_list(bugtool):
"""Assert that the return value of disk_list() contains sda or nvme0n1"""
assert "sda" in bugtool.disk_list() or "nvme0n1" in bugtool.disk_list()

0 comments on commit 18c8fdb

Please sign in to comment.