summaryrefslogtreecommitdiff
path: root/glance_store/tests/unit/test_http_store.py
diff options
context:
space:
mode:
Diffstat (limited to 'glance_store/tests/unit/test_http_store.py')
-rw-r--r--glance_store/tests/unit/test_http_store.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/glance_store/tests/unit/test_http_store.py b/glance_store/tests/unit/test_http_store.py
index 4eafb88..ca3a9c6 100644
--- a/glance_store/tests/unit/test_http_store.py
+++ b/glance_store/tests/unit/test_http_store.py
@@ -184,6 +184,15 @@ class TestHttpStore(base.StoreBaseTest,
self.assertRaises(exceptions.BadStoreUri,
location.get_location_from_uri, uri)
+ def test_http_store_location_get_uri(self):
+ """Test for HTTP URI with and without query"""
+ uris = ["http://netloc/path/to/file.tar.gz"
+ "http://netloc/path/to/file.tar.gz?query=text",
+ ]
+ for uri in uris:
+ loc = location.get_location_from_uri(uri, conf=self.conf)
+ self.assertEqual(uri, loc.store_location.get_uri())
+
def test_http_get_raises_remote_service_unavailable(self):
"""Test http store raises RemoteServiceUnavailable."""
uri = "http://netloc/path/to/file.tar.gz"