summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-05-25 13:06:08 -0400
committerScott Moser <smoser@brickies.net>2017-05-26 13:37:41 -0400
commit1815c6d801933c47a01f1a94a8e689824f6797b4 (patch)
tree8df52d0f27cc498b1a49e55a5ce87bc84386d0ef /tests
parentd27c49391df343d25bd2e24045d2be6bf39c30d2 (diff)
downloadvyos-cloud-init-1815c6d801933c47a01f1a94a8e689824f6797b4.tar.gz
vyos-cloud-init-1815c6d801933c47a01f1a94a8e689824f6797b4.zip
disk_setup: udev settle before attempting partitioning or fs creation.
This attempts to use udevadm settle to wait until devices have been fully "realized". If a device exists, there may still be events in the udev queue that would create its partition table entries. We need to wait until those have been processed also. LP: #1692093
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_handler/test_handler_disk_setup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unittests/test_handler/test_handler_disk_setup.py b/tests/unittests/test_handler/test_handler_disk_setup.py
index e3226978..916a0d7a 100644
--- a/tests/unittests/test_handler/test_handler_disk_setup.py
+++ b/tests/unittests/test_handler/test_handler_disk_setup.py
@@ -168,6 +168,8 @@ class TestUpdateFsSetupDevices(TestCase):
}, fs_setup)
+@mock.patch('cloudinit.config.cc_disk_setup.assert_and_settle_device',
+ return_value=None)
@mock.patch('cloudinit.config.cc_disk_setup.find_device_node',
return_value=('/dev/xdb1', False))
@mock.patch('cloudinit.config.cc_disk_setup.device_type', return_value=None)