Merge ~larsks/cloud-init:bug/1769952 into cloud-init:master

Proposed by Lars Kellogg-Stedman
Status: Merged
Approved by: Chad Smith
Approved revision: fbb5c779eefe6085bd0dfd07bf2867bd3faf2f4a
Merge reported by: Chad Smith
Merged at revision: 3b712fcea9ca685c5cb761ea19c5126acf8ffaa1
Proposed branch: ~larsks/cloud-init:bug/1769952
Merge into: cloud-init:master
Diff against target: 27 lines (+3/-1)
1 file modified
tests/unittests/ (+3/-1)
Reviewer Review Type Date Requested Status
Scott Moser Approve
Server Team CI bot continuous-integration Approve
Review via email:

Commit message

tests: do not rely on host /proc/cmdline in

Make test_net.TestGenerateFallbackConfig.test_unstable_names mock
the value of /proc/cmdline in the same way as the existing
test_unstable_names_disabled test.

LP: #1769952

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:fbb5c779eefe6085bd0dfd07bf2867bd3faf2f4a
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/unittests/ b/tests/unittests/
2index fac8267..73f26bb 100644
3--- a/tests/unittests/
4+++ b/tests/unittests/
5@@ -1608,12 +1608,13 @@ iface eth1 inet dhcp
6 ]
7 self.assertEqual(", ".join(expected_rule) + '\n', contents.lstrip())
9+ @mock.patch("cloudinit.util.get_cmdline")
10 @mock.patch("cloudinit.util.udevadm_settle")
11 @mock.patch("")
12 @mock.patch("")
13 @mock.patch("")
14 def test_unstable_names(self, mock_get_devicelist, mock_read_sys_net,
15- mock_sys_dev_path, mock_settle):
16+ mock_sys_dev_path, mock_settle, m_get_cmdline):
17 """verify that udevadm settle is called when we find unstable names"""
18 devices = {
19 'eth0': {
20@@ -1629,6 +1630,7 @@ iface eth1 inet dhcp
22 }
24+ m_get_cmdline.return_value = ''
25 tmp_dir = self.tmp_dir()
26 _setup_test(tmp_dir, mock_get_devicelist,
27 mock_read_sys_net, mock_sys_dev_path,


People subscribed via source and target branches