summaryrefslogtreecommitdiff
path: root/ick2
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-18 21:28:54 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-18 21:28:54 +0100
commitb7a65fc2ea20ea32dca94205618f94aea3939f33 (patch)
treef038ab7da51fbf1a3dc622b4ca547c05eddc0eda /ick2
parent5c2496588b96b17309e27906c3a7e2c81b8e1fb3 (diff)
downloadick2-b7a65fc2ea20ea32dca94205618f94aea3939f33.tar.gz
Drop: /projects/.../builds from controller API
Diffstat (limited to 'ick2')
-rw-r--r--ick2/projectapi.py13
-rw-r--r--ick2/projectapi_tests.py4
2 files changed, 0 insertions, 17 deletions
diff --git a/ick2/projectapi.py b/ick2/projectapi.py
index fec4585..71fe5ee 100644
--- a/ick2/projectapi.py
+++ b/ick2/projectapi.py
@@ -29,7 +29,6 @@ class ProjectAPI(ick2.ResourceApiBase):
def get_pipeline_routes(self, path): # pragma: no cover
pipeline_path = '{}/<project>/pipelines/<pipeline>'.format(path)
- builds_path = '{}/<project>/builds'.format(path)
return [
{
'method': 'GET',
@@ -41,11 +40,6 @@ class ProjectAPI(ick2.ResourceApiBase):
'path': pipeline_path,
'callback': self.PUT(self.set_pipeline_callback),
},
- {
- 'method': 'GET',
- 'path': builds_path,
- 'callback': self.GET(self.get_builds),
- },
]
def get_pipeline(self, project, pipeline):
@@ -77,10 +71,3 @@ class ProjectAPI(ick2.ResourceApiBase):
self._state.update_resource(self._type_name, project, p)
return {'status': state}
raise ick2.NotFound()
-
- def get_builds(self, project):
- p = self._state.get_resource(self._type_name, project)
- return {
- 'project': project,
- 'builds': p.get('builds', []),
- }
diff --git a/ick2/projectapi_tests.py b/ick2/projectapi_tests.py
index 2e6e14a..975018c 100644
--- a/ick2/projectapi_tests.py
+++ b/ick2/projectapi_tests.py
@@ -58,10 +58,6 @@ class ProjectAPITests(unittest.TestCase):
self.assertEqual(api.create(project), project)
self.assertEqual(api.list(), {'projects': [project]})
self.assertEqual(api.get_pipeline('foo', 'build'), {'status': 'idle'})
- self.assertEqual(
- api.get_builds('foo'),
- {'project': 'foo', 'builds': []}
- )
def test_raises_error_when_getting_missing_pipeline(self):
project = {