diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-06 14:07:58 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-06 14:07:58 +0100 |
commit | c6ce6faab75ea291d85e5780b95cccc255a15c2a (patch) | |
tree | 30c83f6b18731bfdde4268d4a467740fc09c3d9c | |
parent | 917ba8f58479147e773b4a02400e280e1e4a8dff (diff) | |
download | ick2-c6ce6faab75ea291d85e5780b95cccc255a15c2a.tar.gz |
Change: /log to /logs, for consistency
-rw-r--r-- | ick2/controllerapi.py | 6 | ||||
-rw-r--r-- | ick2/controllerapi_tests.py | 4 | ||||
-rw-r--r-- | yarns/400-build.yarn | 34 |
3 files changed, 22 insertions, 22 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index c72c300..8b4bc29 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -34,7 +34,7 @@ class ControllerAPI: apis = { '/version': VersionAPI, '/builds': BuildsAPI, - '/log': LogAPI, + '/logs': LogAPI, '/projects': ProjectAPI, '/work': WorkAPI, '/workers': WorkerAPI, @@ -378,7 +378,7 @@ class WorkAPI(APIbase): 'pipeline': pipeline['name'], 'step': pipeline['actions'][index], 'step_index': index, - 'log': '/log/{}'.format(build_id), + 'log': '/logs/{}'.format(build_id), } worker_state = { @@ -477,7 +477,7 @@ class WorkAPI(APIbase): build_id = 1 build = { 'build_id': build_id, - 'log': '/log/{}'.format(build_id), + 'log': '/logs/{}'.format(build_id), 'worker': worker, 'project': project['project'], 'pipeline': pipeline['name'], diff --git a/ick2/controllerapi_tests.py b/ick2/controllerapi_tests.py index 709f184..8acfd62 100644 --- a/ick2/controllerapi_tests.py +++ b/ick2/controllerapi_tests.py @@ -294,7 +294,7 @@ class WorkAPITests(unittest.TestCase): 'shell': 'step-1', }, 'step_index': 0, - 'log': '/log/1', + 'log': '/logs/1', } self.assertEqual(work.get_work('asterix'), expected) @@ -317,7 +317,7 @@ class WorkAPITests(unittest.TestCase): 'shell': 'step-1', }, 'step_index': 0, - 'log': '/log/1', + 'log': '/logs/1', } self.assertEqual(work.get_work('asterix'), expected) diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn index c57fd07..44e01f3 100644 --- a/yarns/400-build.yarn +++ b/yarns/400-build.yarn @@ -35,7 +35,7 @@ Set up the controller. ... uapi_workers_id_get ... uapi_builds_get ... uapi_builds_id_get - ... uapi_log_id_get + ... uapi_logs_id_get AND a running ick controller Add up a project. @@ -95,7 +95,7 @@ be in the path or can we get it in the access token?** AND body matches ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", @@ -110,7 +110,7 @@ be in the path or can we get it in the access token?** AND body matches ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", @@ -136,7 +136,7 @@ User can now see pipeline is running and which worker is building it. ... "worker": "obelix", ... "doing": { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", @@ -154,17 +154,17 @@ User can now see pipeline is running and which worker is building it. ... "builds": [ ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", ... "status": "building", - ... "log": "/log/1" + ... "log": "/logs/1" ... } ... ] ... } - WHEN user makes request GET /log/1 + WHEN user makes request GET /logs/1 THEN result has status code 200 AND result has header Content-Type: text/plain AND body text is "" @@ -191,7 +191,7 @@ Still the same job, since the first build step didnt't finish. AND body matches ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", @@ -203,7 +203,7 @@ Still the same job, since the first build step didnt't finish. The build log is immediately accessible. - WHEN user makes request GET /log/1 + WHEN user makes request GET /logs/1 THEN result has status code 200 AND result has header Content-Type: text/plain AND body text is "hey ho" @@ -223,7 +223,7 @@ Report the step is done, and successfully. ... } THEN result has status code 201 - WHEN user makes request GET /log/1 + WHEN user makes request GET /logs/1 THEN result has status code 200 AND result has header Content-Type: text/plain AND body text is "hey ho, hey ho\n" @@ -235,7 +235,7 @@ Now there's another step to do. AND body matches ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", @@ -261,7 +261,7 @@ User sees changed status. ... "step": { ... "shell": "day 2" ... }, - ... "log": "/log/1" + ... "log": "/logs/1" ... } ... } @@ -301,12 +301,12 @@ Also, there's a build with a log. ... "builds": [ ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", ... "status": 0, - ... "log": "/log/1" + ... "log": "/logs/1" ... } ... ] ... } @@ -316,15 +316,15 @@ Also, there's a build with a log. AND body matches ... { ... "build_id": 1, - ... "log": "/log/1", + ... "log": "/logs/1", ... "worker": "obelix", ... "project": "rome", ... "pipeline": "construct", ... "status": 0, - ... "log": "/log/1" + ... "log": "/logs/1" ... } - WHEN user makes request GET /log/1 + WHEN user makes request GET /logs/1 THEN result has status code 200 AND result has header Content-Type: text/plain AND body text is "hey ho, hey ho\nto the gold mine we go!\n" |