Commit 9bc7fc94 authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

test: use link local address for URL tests

Because this test really make a connection and the purpose is to test
URL generation, use a link local address that will fail immediately
rather than an unreachable address that will timeout.
parent fa4f0a11
......@@ -83,26 +83,26 @@ class TestSlap(SlapMixin):
def test_slap_initialisation_ipv6_and_port(self):
slap_instance = slapos.slap.slap()
slap_instance.initializeConnection("http://1234:1234:1234:1234:1:1:1:1:5000/foo/")
slap_instance.initializeConnection("http://fe80:1234:1234:1234:1:1:1:1:5000/foo/")
self.assertEqual(
slap_instance._connection_helper.slapgrid_uri,
"http://[1234:1234:1234:1234:1:1:1:1]:5000/foo/"
"http://[fe80:1234:1234:1234:1:1:1:1]:5000/foo/"
)
def test_slap_initialisation_ipv6_without_port(self):
slap_instance = slapos.slap.slap()
slap_instance.initializeConnection("http://1234:1234:1234:1234:1:1:1:1/foo/")
slap_instance.initializeConnection("http://fe80:1234:1234:1234:1:1:1:1/foo/")
self.assertEqual(
slap_instance._connection_helper.slapgrid_uri,
"http://[1234:1234:1234:1234:1:1:1:1]/foo/"
"http://[fe80:1234:1234:1234:1:1:1:1]/foo/"
)
def test_slap_initialisation_ipv6_with_bracket(self):
slap_instance = slapos.slap.slap()
slap_instance.initializeConnection("http://[1234:1234:1234:1234:1:1:1:1]:5000/foo/")
slap_instance.initializeConnection("http://[fe80:1234:1234:1234:1:1:1:1]:5000/foo/")
self.assertEqual(
slap_instance._connection_helper.slapgrid_uri,
"http://[1234:1234:1234:1234:1:1:1:1]:5000/foo/"
"http://[fe80:1234:1234:1234:1:1:1:1]:5000/foo/"
)
def test_slap_initialisation_ipv4(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment