Merge lp://qastaging/~danilo/maas/bug-1699479-dhcp-test-stability into lp://qastaging/~maas-committers/maas/trunk

Proposed by Данило Шеган
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 6100
Proposed branch: lp://qastaging/~danilo/maas/bug-1699479-dhcp-test-stability
Merge into: lp://qastaging/~maas-committers/maas/trunk
Diff against target: 73 lines (+25/-3)
2 files modified
src/maasserver/testing/factory.py (+5/-1)
src/maasserver/tests/test_preseed_network.py (+20/-2)
To merge this branch: bzr merge lp://qastaging/~danilo/maas/bug-1699479-dhcp-test-stability
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Review via email: mp+326069@code.qastaging.launchpad.net

Commit message

Make TestDHCPNetworkLayout.test__dhcp_configurations_rendered always run in both IPv4 and IPv6 network configurations to ensure it stably either passes or fails.

To avoid resolve_hostname() on the MAAS configured URL only return an IP address that it resolves to on the local system (which could be only IPv4 or only IPv6 address) which can't be used for a DNS server, we patch resolve_hostname() in the test to return the appropriate localhost address.

Description of the change

This is a fix for a test that fails on LXD containers occasionally (when subnet ends up being an IPv6 network).

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

I much prefer the v4 and v6 scenario approach to pure randomness. Thanks for the fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.