MCPcopy Index your code
hub / github.com/docker/docker-py / test_exec_inspect

Method test_exec_inspect

tests/integration/api_exec_test.py:155–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153 assert response == ""
154
155 def test_exec_inspect(self):
156 container = self.client.create_container(TEST_IMG, 'cat',
157 detach=True, stdin_open=True)
158 id = container['Id']
159 self.client.start(id)
160 self.tmp_containers.append(id)
161
162 exec_id = self.client.exec_create(id, ['mkdir', '/does/not/exist'])
163 assert 'Id' in exec_id
164 self.client.exec_start(exec_id)
165 exec_info = self.client.exec_inspect(exec_id)
166 assert 'ExitCode' in exec_info
167 assert exec_info['ExitCode'] != 0
168
169 @requires_api_version('1.25')
170 def test_exec_command_with_env(self):

Callers

nothing calls this directly

Calls 5

create_containerMethod · 0.80
exec_createMethod · 0.80
exec_startMethod · 0.80
exec_inspectMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected