Uh oh!
There was an error while loading. Please reload this page.
[cli] run --rm overrides restart: always - #1205
Conversation
josephpage
commented
Mar 27, 2015
All tests pass on local, why they failed with Jenkins ? |
aanand
commented
Mar 27, 2015
Your commit needs signing off: |
aanand
commented
Mar 27, 2015
Also, could we get an integration test please? Thanks! |
#1013 Signed-off-by: Joseph Page <joseph.page@rednet.io>
josephpage
commented
Mar 31, 2015
@aanand Because the container is created and immediately removed by What do you think about it ? @patch('dockerpty.start')deftest_run_service_with_restart_always(self, __):
name='simple'self.command.base_dir='tests/fixtures/restart-composefile'self.command.dispatch(['run', name, '/bin/echo', 'helloworld'], None)
service=self.project.get_service(name)
container=service.containers(one_off=True)[0]
self.assertEqual(container.get('HostConfig.RestartPolicy.Name'), 'always')
self.command.dispatch(['run', '--rm', name, '/bin/echo', 'helloworld'], None)
self.assertEqual(len(service.containers()), 0)
self.assertEqual(len(service.containers(stopped=True)), 0)with this simple:
image: busybox:latestrestart: always |
aanand
commented
Mar 31, 2015
Hm, good point. In that case, maybe just a unit test - use |
Signed-off-by: Joseph Page <joseph.page@rednet.io>
josephpage
commented
Apr 7, 2015
Just added a unit test. Seems good to you @aanand ? |
jaimegildesagredo
commented
Apr 14, 2015
@aanand some updates here? we would need this fix merged. If I can be of some help just ping me. |
dnephin
commented
Apr 15, 2015
LGTM |
aanand
commented
Apr 21, 2015
OK, looks like the CLI code is too tightly coupled to improve that unit test without a lot of refactoring. LGTM |
[cli] run --rm overrides restart: always
Fix#1013
I think docs is not needed because it's an intuitive behavior.