summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ick2/client.py10
-rw-r--r--ick2/client_tests.py12
2 files changed, 12 insertions, 10 deletions
diff --git a/ick2/client.py b/ick2/client.py
index c26b298..bf708ae 100644
--- a/ick2/client.py
+++ b/ick2/client.py
@@ -128,15 +128,17 @@ class ControllerClient:
def url(self, path):
return '{}{}'.format(self._url, path)
- def get_blob_service_url(self):
+ def get_artifact_store_url(self):
url = self.url('/version')
version = self._api.get_dict(url)
- return version.get('blob_service')
+ url = version.get('artifact_store')
+ logging.info('Artifact store URL: %r', url)
+ return url
def get_blob_client(self):
- url = self.get_blob_service_url()
+ url = self.get_artifact_store_url()
blobs = BlobClient()
- blobs.set_url(blobs)
+ blobs.set_url(url)
blobs.set_http_api(self._api)
return blobs
diff --git a/ick2/client_tests.py b/ick2/client_tests.py
index 57486bd..92da36a 100644
--- a/ick2/client_tests.py
+++ b/ick2/client_tests.py
@@ -150,19 +150,19 @@ class ControllerClientTests(unittest.TestCase):
self.session.response = FakeResponse(200)
self.assertEqual(self.controller.report_work(work), None)
- def test_get_blob_service_url_raises_exception_on_error(self):
+ def test_get_artifact_store_url_raises_exception_on_error(self):
self.session.response = FakeResponse(400)
with self.assertRaises(ick2.HttpError):
- self.controller.get_blob_service_url()
+ self.controller.get_artifact_store_url()
- def test_get_blob_service_url_succeeds(self):
+ def test_get_artifact_store_url_succeeds(self):
url = 'https://blobs'
version = {
- 'blob_service': url,
+ 'artifact_store': url,
}
self.session.response = FakeResponse(
200, body=json.dumps(version), content_type=json_type)
- self.assertEqual(self.controller.get_blob_service_url(), url)
+ self.assertEqual(self.controller.get_artifact_store_url(), url)
class BlobServiceClientTests(unittest.TestCase):
@@ -184,7 +184,7 @@ class BlobServiceClientTests(unittest.TestCase):
def get_blob_client(self):
url = 'https://blobs'
version = {
- 'blob_service': url,
+ 'artifact_store': url,
}
self.session.response = FakeResponse(
200, body=json.dumps(version), content_type=json_type)