(self)
| 75 | assert exec_log == b'hello world\n' |
| 76 | |
| 77 | def test_exec_command_as_user(self): |
| 78 | container = self.client.create_container(TEST_IMG, 'cat', |
| 79 | detach=True, stdin_open=True) |
| 80 | id = container['Id'] |
| 81 | self.client.start(id) |
| 82 | self.tmp_containers.append(id) |
| 83 | |
| 84 | res = self.client.exec_create(id, 'whoami', user='postgres') |
| 85 | assert 'Id' in res |
| 86 | |
| 87 | exec_log = self.client.exec_start(res) |
| 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', |
nothing calls this directly
no test coverage detected