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

Method test_update

tests/integration/models_containers_test.py:520–528  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

518 assert 'sleep 60' in top['Processes'][0]
519
520 def test_update(self):
521 client = docker.from_env(version=TEST_API_VERSION)
522 container = client.containers.run("alpine", "sleep 60", detach=True,
523 cpu_shares=2)
524 self.tmp_containers.append(container.id)
525 assert container.attrs['HostConfig']['CpuShares'] == 2
526 container.update(cpu_shares=3)
527 container.reload()
528 assert container.attrs['HostConfig']['CpuShares'] == 3
529
530 def test_wait(self):
531 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 4

from_envMethod · 0.80
runMethod · 0.80
updateMethod · 0.45
reloadMethod · 0.45

Tested by

no test coverage detected