(self)
| 1019 | |
| 1020 | class KillTest(BaseAPIIntegrationTest): |
| 1021 | def test_kill(self): |
| 1022 | container = self.client.create_container(TEST_IMG, ['sleep', '9999']) |
| 1023 | id = container['Id'] |
| 1024 | self.client.start(id) |
| 1025 | self.tmp_containers.append(id) |
| 1026 | self.client.kill(id) |
| 1027 | container_info = self.client.inspect_container(id) |
| 1028 | assert 'State' in container_info |
| 1029 | state = container_info['State'] |
| 1030 | assert 'ExitCode' in state |
| 1031 | assert state['ExitCode'] != 0 |
| 1032 | assert 'Running' in state |
| 1033 | assert state['Running'] is False |
| 1034 | |
| 1035 | def test_kill_with_dict_instead_of_id(self): |
| 1036 | container = self.client.create_container(TEST_IMG, ['sleep', '9999']) |
nothing calls this directly
no test coverage detected