Skip to content

Commit 7dffc46

Browse files
committed
Add integration tests
Signed-off-by: Aaron Cowdin <[email protected]>
1 parent 59ba270 commit 7dffc46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/integration/models_images_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ def test_build_with_error(self):
2828
assert str(cm.exception) == ("Unknown instruction: "
2929
"NOTADOCKERFILECOMMAND")
3030

31+
def test_build_with_multiple_success(self):
32+
client = docker.from_env(version=TEST_API_VERSION)
33+
image = client.images.build(tag='some-tag', fileobj=io.BytesIO(
34+
"FROM alpine\n"
35+
"CMD echo hello world".encode('ascii')
36+
))
37+
self.tmp_imgs.append(image.id)
38+
assert client.containers.run(image) == b"hello world\n"
39+
3140
def test_list(self):
3241
client = docker.from_env(version=TEST_API_VERSION)
3342
image = client.images.pull('alpine:latest')

0 commit comments

Comments
 (0)