test/sgdisk: delete sectorsize from expected data if not in output
The `sfdisk` tool on RHEL-8 does not include the `sectorsize` in its output when we are testing the `sgdisk` stage. As a result, the test case fails, because the expected and actual output differs. Modify the test to delete the `sectorsize` key from the expected output if it is not present in the actual output. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
560fcc099d
commit
66301ae5c3
1 changed files with 6 additions and 0 deletions
|
|
@ -458,6 +458,12 @@ class TestStages(test.TestBase):
|
|||
for p in table["partitions"]:
|
||||
p["node"] = os.path.basename(p["node"])
|
||||
|
||||
# Old versions of sfdisk (e.g. on RHEL-8), do not include
|
||||
# the 'sectorsize' in the output, so we delete it from the
|
||||
# expected output if it is not present in the actual output
|
||||
if "sectorsize" not in table:
|
||||
del want["partitiontable"]["sectorsize"]
|
||||
|
||||
self.assertEqual(have, want)
|
||||
|
||||
# cache the downloaded data for the files source
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue