Skip to content

Commit f817670

Browse files
committed
Merge pull request #740 from helgi/exit_code
ref(deis run): change the /run API to use exit_code instead of rc for the exit code value
2 parents d496e3d + a545e29 commit f817670

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

rootfs/api/tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def test_run(self, mock_requests):
282282
body = {'command': 'ls -al'}
283283
response = self.client.post(url, body)
284284
self.assertEqual(response.status_code, 200, response.data)
285-
self.assertEqual(response.data['rc'], 0)
285+
self.assertEqual(response.data['exit_code'], 0)
286286
self.assertEqual(response.data['output'], 'mock')
287287

288288
def test_run_failure(self, mock_requests):

rootfs/api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def logs(self, request, **kwargs):
227227
def run(self, request, **kwargs):
228228
app = self.get_object()
229229
rc, output = app.run(self.request.user, request.data['command'])
230-
return Response({'rc': rc, 'output': str(output)})
230+
return Response({'exit_code': rc, 'output': str(output)})
231231

232232
def update(self, request, **kwargs):
233233
app = self.get_object()

0 commit comments

Comments
 (0)