test_net.TestGenerateFallbackConfig.test_unstable_names is sensitive to host environment

Bug #1769952 reported by Lars Kellogg-Stedman
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

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)
Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
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:

Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in cloud-init version 18.3.

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  
Everyone can see this information.

Other bug subscribers