Skip to content

Commit 807ee50

Browse files
committed
Merge pull request #546 from helgi/more_restart_test
chore(app::restart): improve test coverage on single pod restarts
2 parents ca7dcc6 + 29edc08 commit 807ee50

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

rootfs/api/tests/test_pods.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,3 +815,13 @@ def test_restart_pods(self):
815815
HTTP_AUTHORIZATION='token {}'.format(self.token))
816816
self.assertEqual(response.status_code, 200)
817817
self.assertEqual(len(response.data), 1)
818+
self.assertEqual(response.data[0]['type'], 'web')
819+
820+
# restart only one web port but using the short name of web-asdfg
821+
name = 'web-' + pod['name'].split('-').pop()
822+
response = self.client.post('/v2/apps/{}/pods/web/{}/restart'.format(app_id, name),
823+
content_type='application/json',
824+
HTTP_AUTHORIZATION='token {}'.format(self.token))
825+
self.assertEqual(response.status_code, 200)
826+
self.assertEqual(len(response.data), 1)
827+
self.assertEqual(response.data[0]['type'], 'web')

0 commit comments

Comments
 (0)