test_net.TestGenerateFallbackConfig.test_unstable_names is sensitive to host environment

Bug #1769952 reported by Lars Kellogg-Stedman on 2018-05-08
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

The test_unstable_names test expects cloudinit.util.udevadm_settle to be called once:

  self.assertEqual(1, mock_settle.call_count)

But cloudinit.net.find_fallback_nic inspects /proc/cmdline for the net.ifnames=0 parameter, and if found will not call udevadm_settle, which causes the test to fail.

The unit tests should not rely on information from the host environment.

Related branches

Ryan Harper (raharper) on 2018-05-08
Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=3b712fce

Changed in cloud-init:
status: Confirmed → Fix Committed

This bug is believed to be fixed in cloud-init in version 18.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers