MCPcopy
hub / github.com/docker/docker-py / test_top

Method test_top

tests/integration/api_container_test.py:1138–1151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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'

Callers

nothing calls this directly

Calls 4

create_containerMethod · 0.80
startMethod · 0.45
topMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected