diff options
author | Aaron Cowdin <aaron.cowdin@gmail.com> | 2017-05-02 17:01:34 -0700 |
---|---|---|
committer | Aaron Cowdin <aaron.cowdin@gmail.com> | 2017-05-02 17:01:34 -0700 |
commit | 7dffc4623485d705ff088817f4439f1edb734547 (patch) | |
tree | 08a8a4e232f29e3d44b9713b8ee44dcd37d2ff83 | |
parent | 59ba27068b524bdbfe60dd74762e28acd709caea (diff) | |
download | docker-py-7dffc4623485d705ff088817f4439f1edb734547.tar.gz |
Add integration tests
Signed-off-by: Aaron Cowdin <aaron.cowdin@gmail.com>
-rw-r--r-- | tests/integration/models_images_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/integration/models_images_test.py b/tests/integration/models_images_test.py index 4f8bb26..49e06f6 100644 --- a/tests/integration/models_images_test.py +++ b/tests/integration/models_images_test.py @@ -28,6 +28,15 @@ class ImageCollectionTest(BaseIntegrationTest): assert str(cm.exception) == ("Unknown instruction: " "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): client = docker.from_env(version=TEST_API_VERSION) image = client.images.pull('alpine:latest') |