Skip to content

Commit 02e7717

Browse files
committed
Merge pull request #587 from docker/fix-586
Fixes for "make integration-test"
2 parents bef23fe + 2fdc433 commit 02e7717

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.PHONY: all build test integration-test unit-test
22

3+
HOST_TMPDIR=test -n "$(TMPDIR)" && echo $(TMPDIR) || echo /tmp
4+
35
all: test
46

57
build:
@@ -11,5 +13,4 @@ unit-test: build
1113
docker run docker-py python tests/test.py
1214

1315
integration-test: build
14-
docker run -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py
15-
16+
docker run -e NOT_ON_HOST=true -v `$(HOST_TMPDIR)`:/tmp -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py

docker/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "1.2.2"
1+
version = "1.2.3-dev"
22
version_info = tuple([int(d) for d in version.replace("-dev", "").split(".")])

tests/integration_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
# export; history; insert; port; push; tag; get; load; stats
4040
DEFAULT_BASE_URL = os.environ.get('DOCKER_HOST')
4141
EXEC_DRIVER_IS_NATIVE = True
42+
NOT_ON_HOST = os.environ.get('NOT_ON_HOST', False)
4243

4344
warnings.simplefilter('error')
4445
create_host_config = docker.utils.create_host_config
@@ -1435,6 +1436,7 @@ def runTest(self):
14351436
self.tmp_imgs.append(img_id)
14361437

14371438

1439+
@unittest.skipIf(NOT_ON_HOST, 'Tests running inside a container')
14381440
class TestImportFromURL(ImportTestCase):
14391441
'''Tests downloading an image over HTTP.'''
14401442

0 commit comments

Comments
 (0)