Fix API url for 'graph download --release' command
merged_plugins_tasks_api_path was used instead of cluster_release_tasks_api_path. Change-Id: Ie4d2aa3c6c9c532fb62444665b10e8e9e5be968f
This commit is contained in:
@@ -124,10 +124,40 @@ class TestDeploymentGraphFacade(test_api.BaseLibTest):
|
||||
self.client.list(1)
|
||||
self.assertTrue(matcher_get.called)
|
||||
|
||||
def test_graphs_download(self):
|
||||
def test_graphs_download_all(self):
|
||||
matcher_get = self.m_request.get(
|
||||
'/api/v1/clusters/1/deployment_tasks/?graph_type=custom_graph',
|
||||
json=[]
|
||||
)
|
||||
self.client.download(env_id=1, level='all', graph_type='custom_graph')
|
||||
self.client.download(env_id=1, level='all',
|
||||
graph_type='custom_graph')
|
||||
self.assertTrue(matcher_get.called)
|
||||
|
||||
def test_graphs_download_release(self):
|
||||
matcher_get = self.m_request.get(
|
||||
'/api/v1/clusters/1/deployment_tasks/'
|
||||
'release/?graph_type=custom_graph',
|
||||
json=[]
|
||||
)
|
||||
self.client.download(env_id=1, level='release',
|
||||
graph_type='custom_graph')
|
||||
self.assertTrue(matcher_get.called)
|
||||
|
||||
def test_graphs_download_plugins(self):
|
||||
matcher_get = self.m_request.get(
|
||||
'/api/v1/clusters/1/deployment_tasks/'
|
||||
'plugins/?graph_type=custom_graph',
|
||||
json=[]
|
||||
)
|
||||
self.client.download(env_id=1, level='plugins',
|
||||
graph_type='custom_graph')
|
||||
self.assertTrue(matcher_get.called)
|
||||
|
||||
def test_graphs_download_cluster(self):
|
||||
matcher_get = self.m_request.get(
|
||||
'/api/v1/clusters/1/deployment_graphs/custom_graph',
|
||||
json={'tasks': []}
|
||||
)
|
||||
self.client.download(env_id=1, level='cluster',
|
||||
graph_type='custom_graph')
|
||||
self.assertTrue(matcher_get.called)
|
||||
|
||||
@@ -110,7 +110,7 @@ class GraphClient(base_v1.BaseV1Client):
|
||||
|
||||
def get_release_tasks_for_cluster(self, env_id, graph_type=None):
|
||||
return self.connection.get_request(
|
||||
self.merged_plugins_tasks_api_path.format(
|
||||
self.cluster_release_tasks_api_path.format(
|
||||
env_id=env_id,
|
||||
graph_type=graph_type or ""))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user