From: Alfredo Deza Date: Fri, 19 Jun 2015 16:38:58 +0000 (-0400) Subject: add more tests for client that involve ipv6 X-Git-Tag: v1.2.3~3^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c2a2e64d0aa633d8a0b0ea8f4d1fcd6baf9c0837;p=radosgw-agent.git add more tests for client that involve ipv6 Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/tests/test_client.py b/radosgw_agent/tests/test_client.py index 7e24dc1..624b336 100644 --- a/radosgw_agent/tests/test_client.py +++ b/radosgw_agent/tests/test_client.py @@ -14,6 +14,10 @@ def endpoints(): return [ ('http://example.org', 'example.org', 80, False), ('https://example.org', 'example.org', 443, True), + ('https://[e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', '[e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', 443, True), + ('http://[e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', '[e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', 80, False), + ('http://[e39:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]:8080', '[e39:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', 8080, False), + ('http://e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922', '[e40:92be:ab1c:c9c1:3e2e:dbf6:57c6:8922]', 80, False), ('https://example.org:8080', 'example.org', 8080, True), ('https://example.org:8080/', 'example.org', 8080, True), ('http://example.org:81/a/b/c?b#d', 'example.org', 81, False), @@ -176,6 +180,7 @@ def test_endpoint_port_specified(): endpoint = client.Endpoint('example.org', 443, True) assert endpoint.port == 443 + def test_endpoint_equality(): default_port = client.Endpoint('a.org', None, True) secure = client.Endpoint('a.org', 443, True) @@ -184,6 +189,7 @@ def test_endpoint_equality(): assert secure == insecure assert insecure == default_port + def test_endpoint_inequality(): base = client.Endpoint('a.org', 80, True) diff_host = client.Endpoint('b.org', 80, True)