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

Method test_commit

tests/integration/api_image_test.py:77–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75
76class CommitTest(BaseAPIIntegrationTest):
77 def test_commit(self):
78 container = self.client.create_container(TEST_IMG, ['touch', '/test'])
79 id = container['Id']
80 self.client.start(id)
81 self.tmp_containers.append(id)
82 res = self.client.commit(id)
83 assert 'Id' in res
84 img_id = res['Id']
85 self.tmp_imgs.append(img_id)
86 img = self.client.inspect_image(img_id)
87 assert 'Parent' in img
88 busybox_id = self.client.inspect_image(TEST_IMG)['Id']
89 assert img['Parent'] == busybox_id
90
91 def test_commit_with_changes(self):
92 cid = self.client.create_container(TEST_IMG, ['touch', '/test'])

Callers

nothing calls this directly

Calls 4

create_containerMethod · 0.80
inspect_imageMethod · 0.80
startMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected