summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2021-11-09 09:28:19 -0600
committerGitHub <noreply@github.com>2021-11-09 08:28:19 -0700
commit3d150688617e2b8a16d715c7fb819c759f91915a (patch)
tree839272a885562107a8a16c15600e4553574a2393 /tests/unittests/test_handler
parent6421a2026f05267f2112c52417d0c4b036aeaf40 (diff)
downloadvyos-cloud-init-3d150688617e2b8a16d715c7fb819c759f91915a.tar.gz
vyos-cloud-init-3d150688617e2b8a16d715c7fb819c759f91915a.zip
Wait for apt lock (#1034)
Currently any attempt to run an apt command while another process holds an apt lock will fail. We should instead wait to acquire the apt lock. LP: #1944611
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r--tests/unittests/test_handler/test_handler_landscape.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unittests/test_handler/test_handler_landscape.py b/tests/unittests/test_handler/test_handler_landscape.py
index 00333985..1cc73ea2 100644
--- a/tests/unittests/test_handler/test_handler_landscape.py
+++ b/tests/unittests/test_handler/test_handler_landscape.py
@@ -22,6 +22,10 @@ class TestLandscape(FilesystemMockingTestCase):
self.conf = self.tmp_path('client.conf', self.new_root)
self.default_file = self.tmp_path('default_landscape', self.new_root)
self.patchUtils(self.new_root)
+ self.add_patch(
+ 'cloudinit.distros.ubuntu.Distro.install_packages',
+ 'm_install_packages'
+ )
def test_handler_skips_empty_landscape_cloudconfig(self):
"""Empty landscape cloud-config section does no work."""