From 3d150688617e2b8a16d715c7fb819c759f91915a Mon Sep 17 00:00:00 2001 From: James Falcon Date: Tue, 9 Nov 2021 09:28:19 -0600 Subject: 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 --- tests/unittests/test_handler/test_handler_landscape.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/unittests/test_handler') 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.""" -- cgit v1.2.3