Merge ~igor-brovtsin/maas:no-route-found-test-fix into maas:master

Proposed by Igor Brovtsin
Status: Merged
Approved by: Igor Brovtsin
Approved revision: bf6e3d80eb237aeeed48ecae3e2a46973c07ec4e
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~igor-brovtsin/maas:no-route-found-test-fix
Merge into: maas:master
Diff against target: 13 lines (+1/-1)
1 file modified
src/provisioningserver/utils/tests/test_network.py (+1/-1)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Adam Collard (community) Approve
Review via email: mp+430019@code.launchpad.net

Commit message

Updated IP for "no route" test in "provisioningserver.utils.tests.test_network:TestGetSourceAddress"

Description of the change

Previously, this test failed in some environments where there was a route to `127.0.0.0` (see https://bugs.launchpad.net/maas/+bug/1989949). This MP replaces the IP to `255.255.255.255` that works better in that context.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b no-route-found-test-fix lp:~igor-brovtsin/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 8490dbfc3102cd3942354931e53bd43e5ad0f339

review: Approve
Revision history for this message
Adam Collard (adam-collard) wrote :

+1 with suggestions

review: Approve
Revision history for this message
Igor Brovtsin (igor-brovtsin) :
Revision history for this message
Adam Collard (adam-collard) :
Revision history for this message
Igor Brovtsin (igor-brovtsin) :
bf6e3d8... by Igor Brovtsin

Changed assertThat(Is(None)) to assertIsNone in test_returns_none_if_no_route_found

Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b no-route-found-test-fix lp:~igor-brovtsin/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: bf6e3d80eb237aeeed48ecae3e2a46973c07ec4e

review: Approve
Revision history for this message
Anton Troyanov (troyanov) wrote :

Congrats on the 1st landed MP :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/provisioningserver/utils/tests/test_network.py b/src/provisioningserver/utils/tests/test_network.py
2index 433db7d..3d82a40 100644
3--- a/src/provisioningserver/utils/tests/test_network.py
4+++ b/src/provisioningserver/utils/tests/test_network.py
5@@ -2471,7 +2471,7 @@ class TestGetSourceAddress(MAASTestCase):
6 self.assertThat(get_source_address("::1"), Equals("::1"))
7
8 def test_returns_none_if_no_route_found(self):
9- self.assertThat(get_source_address("127.0.0.0"), Is(None))
10+ self.assertIsNone(get_source_address("255.255.255.255"))
11
12 def test_returns_appropriate_address_for_global_ip(self):
13 self.assertThat(get_source_address("8.8.8.8"), Not(Is(None)))

Subscribers

People subscribed via source and target branches