|
|
1c4b60 |
From a709c4db1bcf2e7ff69158a54ed3a1ea92ba4f97 Mon Sep 17 00:00:00 2001
|
|
|
1c4b60 |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
|
1c4b60 |
Date: Thu, 14 Oct 2021 08:48:05 +0200
|
|
|
1c4b60 |
Subject: [PATCH] tests: Mark "fake" disks in test_get_related_disks as
|
|
|
1c4b60 |
non-existing
|
|
|
1c4b60 |
|
|
|
1c4b60 |
We are using "real" disk names ("sda", "sdb"...) in this test so
|
|
|
1c4b60 |
we need to avoid reading their real sizes which we do for existing
|
|
|
1c4b60 |
devices using os.stat. The test can fail if we have a disk with
|
|
|
1c4b60 |
the same name and small (or zero) size.
|
|
|
1c4b60 |
|
|
|
1c4b60 |
Resolves: rhbz#2062690
|
|
|
1c4b60 |
---
|
|
|
1c4b60 |
tests/devicetree_test.py | 6 +++---
|
|
|
1c4b60 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
1c4b60 |
|
|
|
1c4b60 |
diff --git a/tests/devicetree_test.py b/tests/devicetree_test.py
|
|
|
1c4b60 |
index 3be4d572..c1b97c52 100644
|
|
|
1c4b60 |
--- a/tests/devicetree_test.py
|
|
|
1c4b60 |
+++ b/tests/devicetree_test.py
|
|
|
1c4b60 |
@@ -406,9 +406,9 @@ class DeviceTreeTestCase(unittest.TestCase):
|
|
|
1c4b60 |
def test_get_related_disks(self):
|
|
|
1c4b60 |
tree = DeviceTree()
|
|
|
1c4b60 |
|
|
|
1c4b60 |
- sda = DiskDevice("sda", size=Size('300g'))
|
|
|
1c4b60 |
- sdb = DiskDevice("sdb", size=Size('300g'))
|
|
|
1c4b60 |
- sdc = DiskDevice("sdc", size=Size('300G'))
|
|
|
1c4b60 |
+ sda = DiskDevice("sda", size=Size('300g'), exists=False)
|
|
|
1c4b60 |
+ sdb = DiskDevice("sdb", size=Size('300g'), exists=False)
|
|
|
1c4b60 |
+ sdc = DiskDevice("sdc", size=Size('300G'), exists=False)
|
|
|
1c4b60 |
|
|
|
1c4b60 |
tree._add_device(sda)
|
|
|
1c4b60 |
tree._add_device(sdb)
|
|
|
1c4b60 |
--
|
|
|
1c4b60 |
2.34.3
|
|
|
1c4b60 |
|