summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-03-30 10:28:08 +0300
committerLars Wirzenius <liw@liw.fi>2018-03-30 11:52:18 +0300
commit44298d0ee50d9a844dcd6e4a46bb9f3c2b00208b (patch)
treef3e1b5e4df6c0c21086b1c1d22024dd23fee81c1
parent974631edc803b66e4487431c596664371bf0400a (diff)
downloadick2-44298d0ee50d9a844dcd6e4a46bb9f3c2b00208b.tar.gz
Change: rename blob service to artifact store
-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)