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

Method test_exec_command_as_root

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

Source from the content-addressed store, hash-verified

88 assert exec_log == b'postgres\n'
89
90 def test_exec_command_as_root(self):
91 container = self.client.create_container(TEST_IMG, 'cat',
92 detach=True, stdin_open=True)
93 id = container['Id']
94 self.client.start(id)
95 self.tmp_containers.append(id)
96
97 res = self.client.exec_create(id, 'whoami')
98 assert 'Id' in res
99
100 exec_log = self.client.exec_start(res)
101 assert exec_log == b'root\n'
102
103 def test_exec_command_streaming(self):
104 container = self.client.create_container(TEST_IMG, 'cat',

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected