(self)
| 1136 | @pytest.mark.xfail(reason='Output of docker top depends on host distro, ' |
| 1137 | 'and is not formalized.') |
| 1138 | def test_top(self): |
| 1139 | container = self.client.create_container( |
| 1140 | TEST_IMG, ['sleep', '60'] |
| 1141 | ) |
| 1142 | |
| 1143 | self.tmp_containers.append(container) |
| 1144 | |
| 1145 | self.client.start(container) |
| 1146 | res = self.client.top(container) |
| 1147 | if not IS_WINDOWS_PLATFORM: |
| 1148 | assert res['Titles'] == ['PID', 'USER', 'TIME', 'COMMAND'] |
| 1149 | assert len(res['Processes']) == 1 |
| 1150 | assert res['Processes'][0][-1] == 'sleep 60' |
| 1151 | self.client.kill(container) |
| 1152 | |
| 1153 | @pytest.mark.skipif( |
| 1154 | IS_WINDOWS_PLATFORM, reason='No psargs support on windows' |
nothing calls this directly
no test coverage detected