From dd4630ca9ce7c00e3d6459e73ab82b2f43724488 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 7 Sep 2017 18:32:49 -0700 Subject: [PATCH] Fix test-docker-py on some arches When running 'make all' on armhf, I got this: > ---> Making bundle: .integration-daemon-start (in bundles/17.06.0-dev/test-docker-py) > Using test binary docker > INFO: Waiting for daemon to start... > Starting dockerd > . > Traceback (most recent call last): > File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line > 320, in _importconftest > mod = conftestpath.pyimport() > File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line > 662, in pyimport > __import__(modname) > File "/docker-py/tests/integration/conftest.py", line 6, in > import docker.errors > File "/docker-py/docker/__init__.py", line 2, in > from .api import APIClient > File "/docker-py/docker/api/__init__.py", line 2, in > from .client import APIClient > File "/docker-py/docker/api/client.py", line 11, in > from .build import BuildApiMixin > File "/docker-py/docker/api/build.py", line 6, in > from .. import auth > File "/docker-py/docker/auth.py", line 6, in > import dockerpycreds > ImportError: No module named dockerpycreds > ERROR: could not load /docker-py/tests/integration/conftest.py The fix for this was already provided by commit 0ec8f56a3 and commit c7c923594, but for some reason it did not made its way to Dockerfiles for all architectures. While at it, remove excessive comments. Signed-off-by: Kir Kolyshkin Upstream-commit: 7439d360fd567e063b8e9c4174a5c21b9fbc06aa Component: engine --- components/engine/Dockerfile | 3 --- components/engine/Dockerfile.aarch64 | 4 +--- components/engine/Dockerfile.armhf | 2 ++ components/engine/Dockerfile.ppc64le | 2 ++ components/engine/Dockerfile.s390x | 2 ++ 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 0d8dd52481..0e7ee047a7 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -149,9 +149,6 @@ RUN set -x \ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef # To run integration tests docker-pycreds is required. -# Before running the integration tests conftest.py is -# loaded which results in loads auth.py that -# imports the docker-pycreds module. RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ diff --git a/components/engine/Dockerfile.aarch64 b/components/engine/Dockerfile.aarch64 index 630f8b8cba..dfe2b0f33e 100644 --- a/components/engine/Dockerfile.aarch64 +++ b/components/engine/Dockerfile.aarch64 @@ -125,9 +125,7 @@ RUN set -x \ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef -# Before running the integration tests conftest.py is -# loaded which results in loads auth.py that -# imports the docker-pycreds module. +# To run integration tests docker-pycreds is required. RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ diff --git a/components/engine/Dockerfile.armhf b/components/engine/Dockerfile.armhf index 1f703f29bb..9b0cfe00da 100644 --- a/components/engine/Dockerfile.armhf +++ b/components/engine/Dockerfile.armhf @@ -118,9 +118,11 @@ RUN set -x \ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef +# To run integration tests docker-pycreds is required. RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ + && pip install docker-pycreds==0.2.1 \ && pip install -r test-requirements.txt # Set user.email so crosbymichael's in-container merge commits go smoothly diff --git a/components/engine/Dockerfile.ppc64le b/components/engine/Dockerfile.ppc64le index 865d293516..f83196a1b4 100644 --- a/components/engine/Dockerfile.ppc64le +++ b/components/engine/Dockerfile.ppc64le @@ -117,9 +117,11 @@ RUN set -x \ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef +# To run integration tests docker-pycreds is required. RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ + && pip install docker-pycreds==0.2.1 \ && pip install -r test-requirements.txt # Set user.email so crosbymichael's in-container merge commits go smoothly diff --git a/components/engine/Dockerfile.s390x b/components/engine/Dockerfile.s390x index aa1e555286..a3de760ef8 100644 --- a/components/engine/Dockerfile.s390x +++ b/components/engine/Dockerfile.s390x @@ -110,9 +110,11 @@ RUN set -x \ # Get the "docker-py" source so we can run their integration tests ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef +# To run integration tests docker-pycreds is required. RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ + && pip install docker-pycreds==0.2.1 \ && pip install -r test-requirements.txt # Set user.email so crosbymichael's in-container merge commits go smoothly