Kaydet (Commit) 7dffc462 authored tarafından Aaron Cowdin's avatar Aaron Cowdin

Add integration tests

Signed-off-by: 's avatarAaron Cowdin <aaron.cowdin@gmail.com>
üst 59ba2706
...@@ -28,6 +28,15 @@ class ImageCollectionTest(BaseIntegrationTest): ...@@ -28,6 +28,15 @@ class ImageCollectionTest(BaseIntegrationTest):
assert str(cm.exception) == ("Unknown instruction: " assert str(cm.exception) == ("Unknown instruction: "
"NOTADOCKERFILECOMMAND") "NOTADOCKERFILECOMMAND")
def test_build_with_multiple_success(self):
client = docker.from_env(version=TEST_API_VERSION)
image = client.images.build(tag='some-tag', fileobj=io.BytesIO(
"FROM alpine\n"
"CMD echo hello world".encode('ascii')
))
self.tmp_imgs.append(image.id)
assert client.containers.run(image) == b"hello world\n"
def test_list(self): def test_list(self):
client = docker.from_env(version=TEST_API_VERSION) client = docker.from_env(version=TEST_API_VERSION)
image = client.images.pull('alpine:latest') image = client.images.pull('alpine:latest')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment