]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
add more tests for client that involve ipv6
authorAlfredo Deza <adeza@redhat.com>
Fri, 19 Jun 2015 16:38:58 +0000 (12:38 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 19 Jun 2015 16:38:58 +0000 (12:38 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/tests/test_client.py

index 7e24dc1784204fee3bd43c80a975adcbee3fcdfe..624b336e62cb3b53f82b40979289fba87d3956ef 100644 (file)
@@ -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)