(self)
| 1378 | |
| 1379 | class PauseTest(BaseAPIIntegrationTest): |
| 1380 | def test_pause_unpause(self): |
| 1381 | container = self.client.create_container(TEST_IMG, ['sleep', '9999']) |
| 1382 | id = container['Id'] |
| 1383 | self.tmp_containers.append(id) |
| 1384 | self.client.start(container) |
| 1385 | self.client.pause(id) |
| 1386 | container_info = self.client.inspect_container(id) |
| 1387 | assert 'State' in container_info |
| 1388 | state = container_info['State'] |
| 1389 | assert 'ExitCode' in state |
| 1390 | assert state['ExitCode'] == 0 |
| 1391 | assert 'Running' in state |
| 1392 | assert state['Running'] is True |
| 1393 | assert 'Paused' in state |
| 1394 | assert state['Paused'] is True |
| 1395 | |
| 1396 | self.client.unpause(id) |
| 1397 | container_info = self.client.inspect_container(id) |
| 1398 | assert 'State' in container_info |
| 1399 | state = container_info['State'] |
| 1400 | assert 'ExitCode' in state |
| 1401 | assert state['ExitCode'] == 0 |
| 1402 | assert 'Running' in state |
| 1403 | assert state['Running'] is True |
| 1404 | assert 'Paused' in state |
| 1405 | assert state['Paused'] is False |
| 1406 | |
| 1407 | |
| 1408 | class PruneTest(BaseAPIIntegrationTest): |
nothing calls this directly
no test coverage detected