summaryrefslogtreecommitdiff
path: root/ick2/workapi_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-26 16:41:33 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-26 17:59:59 +0100
commit964e646b2c26bcb007390dc6af625835f98887ec (patch)
treeae7ea88c5894ad71167959ed82d81b984f78b5e7 /ick2/workapi_tests.py
parentf0ccb8150a67b10e11b3358d6385e31619e6d1e3 (diff)
downloadick2-964e646b2c26bcb007390dc6af625835f98887ec.tar.gz
Update: project and work apis to handle named pipelines
Diffstat (limited to 'ick2/workapi_tests.py')
-rw-r--r--ick2/workapi_tests.py25
1 files changed, 12 insertions, 13 deletions
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)