Host environment bleeds into test for mirror access testing

Bug #1792799 reported by Robert Schweikert on 2018-09-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Undecided
Robert Schweikert

Bug Description

FAIL: tests.unittests.test_handler.test_handler_apt_source_v3.TestAptSourceConfig.test_apt_v3_mirror_search_dns
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/work/rjschwei/devel/cloud-init/tests/unittests/test_handler/test_handler_apt_source_v3.py", line 988, in test_apt_v3_mirror_search_dns
    mockse.assert_has_calls(calls)
  File "/usr/lib64/python3.6/unittest/mock.py", line 846, in assert_has_calls
    ) from cause
AssertionError: Calls not found.
Expected: [call(None),
 call(['http://ubuntu-mirror.localdomain/ubuntu', 'http://ubuntu-mirror/ubuntu']),
 call(None),
 call(['http://ubuntu-security-mirror.localdomain/ubuntu', 'http://ubuntu-security-mirror/ubuntu'])]
Actual: [call(None),
 call(['http://ubuntu-mirror.suse.de/ubuntu', 'http://ubuntu-mirror.localdomain/ubuntu', 'http://ubuntu-mirror/ubuntu']),
 call(None),
 call(['http://ubuntu-security-mirror.suse.de/ubuntu', 'http://ubuntu-security-mirror.localdomain/ubuntu', 'http://ubuntu-security-mirror/ubuntu'])]
-------------------- >> begin captured logging << --------------------
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got primary mirror: http://mocked/foo
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got security mirror: http://mocked/foo
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got primary mirror: http://mocked/foo
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got security mirror: http://mocked/foo
cloudinit.util: DEBUG: Reading from /tmp/tmpsdcw1kdi/etc/hosts (quiet=False)
cloudinit.util: DEBUG: Reading from /tmp/tmpsdcw1kdi/etc/hosts (quiet=False)
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got primary mirror: phit
cloudinit.util: DEBUG: Reading from /tmp/tmpsdcw1kdi/etc/hosts (quiet=False)
cloudinit.util: DEBUG: Reading from /tmp/tmpsdcw1kdi/etc/hosts (quiet=False)
tests.unittests.test_handler.test_handler_apt_configure_sources_list_v3: DEBUG: got security mirror: shit

Related branches

Changed in cloud-init:
assignee: nobody → Robert Schweikert (rjschwei)

This bug is fixed with commit 37078046 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=37078046

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

This bug is believed to be fixed in cloud-init in version 18.4. 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