From 3d6c91b46990213b0a7f96005cfc36c5c61e97b7 Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Mon, 21 Sep 2015 17:39:48 +0200 Subject: [PATCH] Only pull busybox in integration tests if we don't already have it Signed-off-by: Aanand Prasad --- tests/integration_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration_test.py b/tests/integration_test.py index bf56ffca..d92500a0 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -33,7 +33,7 @@ from six.moves import BaseHTTPServer from six.moves import socketserver import docker -from docker.errors import APIError +from docker.errors import APIError, NotFound from docker.utils import kwargs_from_env from .base import requires_api_version @@ -71,7 +71,11 @@ def docker_client_kwargs(**kwargs): def setup_module(): c = docker_client() - c.pull(BUSYBOX) + try: + c.inspect_image(BUSYBOX) + except NotFound: + c.pull(BUSYBOX) + c.inspect_image(BUSYBOX) c.close()