test/parted: 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 `parted` 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
9a47a56639
commit
560fcc099d
1 changed files with 6 additions and 0 deletions
|
|
@ -408,6 +408,12 @@ class TestStages(test.TestBase):
|
||||||
del p["uuid"]
|
del p["uuid"]
|
||||||
p["node"] = os.path.basename(p["node"])
|
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)
|
self.assertEqual(have, want)
|
||||||
|
|
||||||
# cache the downloaded data for the files source
|
# cache the downloaded data for the files source
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue