From 964e646b2c26bcb007390dc6af625835f98887ec Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 26 Nov 2017 16:41:33 +0100 Subject: Update: project and work apis to handle named pipelines --- ick2/workapi_tests.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'ick2/workapi_tests.py') diff --git a/ick2/workapi_tests.py b/ick2/workapi_tests.py index f657687..c855895 100644 --- a/ick2/workapi_tests.py +++ b/ick2/workapi_tests.py @@ -34,24 +34,23 @@ class WorkAPITests(unittest.TestCase): shutil.rmtree(self.tempdir) def create_project_api(self): + pipeline = { + 'name': 'build', + 'actions': [ + {'shell': 'step-1'}, + {'shell': 'step-2'}, + ], + } + + pipeapi = ick2.PipelineAPI(self.state) + pipeapi.create(pipeline) + project = { 'project': 'foo', 'parameters': { 'foo': 'bar', }, - 'pipelines': [ - { - 'name': 'build', - 'actions': [ - { - 'shell': 'step-1', - }, - { - 'shell': 'step-2', - }, - ], - }, - ], + 'pipelines': ['build'], } api = ick2.ProjectAPI(self.state) api.create(project) -- cgit v1.2.1