-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu/jammy: fix dailies #5712
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,22 +147,21 @@ Last-Update: 2024-02-14 | |
install = cc.distro.install_packages | ||
|
||
for backend, cmd, package in BACKEND_DEF: | ||
@@ -88,23 +84,21 @@ class TestLxd(t_help.CiTestCase): | ||
if backend == "lvm": | ||
self.assertEqual( | ||
[ | ||
@@ -85,22 +81,14 @@ class TestLxd(t_help.CiTestCase): | ||
subp.call_args_list, | ||
) | ||
|
||
- if backend == "lvm": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is... confusing. The original test checks to make sure that the semaphore exists when waiting for snap. But on jammy, I'm not sure why we are still testing for this call. Am I missing something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we were testing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I know, I'm commenting on the remaining test. I don't think that it tests anything valuable, but I guess it doesn't hurt anything either. |
||
- self.assertEqual( | ||
- [ | ||
- mock.call(sem_file), | ||
mock.call( | ||
"/lib/modules/mykernel/" | ||
"kernel/drivers/md/dm-thin-pool.ko" | ||
- ), | ||
+ ) | ||
], | ||
exists.call_args_list, | ||
) | ||
else: | ||
- ], | ||
- exists.call_args_list, | ||
- ) | ||
- else: | ||
- self.assertEqual([mock.call(sem_file)], exists.call_args_list) | ||
- del_file(sem_file) | ||
+ if backend != "lvm": | ||
+ self.assertEqual([], exists.call_args_list) | ||
|
||
@mock.patch("cloudinit.config.cc_lxd.maybe_cleanup_default") | ||
|
@@ -174,7 +173,7 @@ Last-Update: 2024-02-14 | |
cc.distro = mock.MagicMock() | ||
mock_subp.which.return_value = None | ||
cc_lxd.handle("cc_lxd", LXD_INIT_CFG, cc, []) | ||
@@ -118,7 +112,7 @@ class TestLxd(t_help.CiTestCase): | ||
@@ -114,7 +102,7 @@ class TestLxd(t_help.CiTestCase): | ||
@mock.patch("cloudinit.config.cc_lxd.maybe_cleanup_default") | ||
@mock.patch("cloudinit.config.cc_lxd.subp") | ||
def test_no_init_does_nothing(self, mock_subp, m_maybe_clean): | ||
|
@@ -183,7 +182,7 @@ Last-Update: 2024-02-14 | |
cc.distro = mock.MagicMock() | ||
cc_lxd.handle("cc_lxd", {"lxd": {}}, cc, []) | ||
self.assertFalse(cc.distro.install_packages.called) | ||
@@ -128,17 +122,16 @@ class TestLxd(t_help.CiTestCase): | ||
@@ -124,17 +112,16 @@ class TestLxd(t_help.CiTestCase): | ||
@mock.patch("cloudinit.config.cc_lxd.maybe_cleanup_default") | ||
@mock.patch("cloudinit.config.cc_lxd.subp") | ||
def test_no_lxd_does_nothing(self, mock_subp, m_maybe_clean): | ||
|
@@ -204,7 +203,7 @@ Last-Update: 2024-02-14 | |
cc.distro = mock.MagicMock() | ||
cc_lxd.handle( | ||
"cc_lxd", | ||
@@ -153,7 +146,6 @@ class TestLxd(t_help.CiTestCase): | ||
@@ -149,7 +136,6 @@ class TestLxd(t_help.CiTestCase): | ||
], | ||
mock_subp.subp.call_args_list, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes