mirror of https://github.com/docker/docker-py.git
Fixes for #586
This commit is contained in:
parent
bef23feb71
commit
070cbece0a
5
Makefile
5
Makefile
|
@ -1,5 +1,7 @@
|
||||||
.PHONY: all build test integration-test unit-test
|
.PHONY: all build test integration-test unit-test
|
||||||
|
|
||||||
|
HOST_TMPDIR=test -n "$(TMPDIR)" && echo $(TMPDIR) || echo /tmp
|
||||||
|
|
||||||
all: test
|
all: test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
@ -11,5 +13,4 @@ unit-test: build
|
||||||
docker run docker-py python tests/test.py
|
docker run docker-py python tests/test.py
|
||||||
|
|
||||||
integration-test: build
|
integration-test: build
|
||||||
docker run -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py
|
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
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ from test import Cleanup
|
||||||
# export; history; insert; port; push; tag; get; load; stats
|
# export; history; insert; port; push; tag; get; load; stats
|
||||||
DEFAULT_BASE_URL = os.environ.get('DOCKER_HOST')
|
DEFAULT_BASE_URL = os.environ.get('DOCKER_HOST')
|
||||||
EXEC_DRIVER_IS_NATIVE = True
|
EXEC_DRIVER_IS_NATIVE = True
|
||||||
|
NOT_ON_HOST = os.environ.get('NOT_ON_HOST', False)
|
||||||
|
|
||||||
warnings.simplefilter('error')
|
warnings.simplefilter('error')
|
||||||
create_host_config = docker.utils.create_host_config
|
create_host_config = docker.utils.create_host_config
|
||||||
|
@ -1435,6 +1436,7 @@ class TestImportFromStream(ImportTestCase):
|
||||||
self.tmp_imgs.append(img_id)
|
self.tmp_imgs.append(img_id)
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(NOT_ON_HOST, 'Tests running inside a container')
|
||||||
class TestImportFromURL(ImportTestCase):
|
class TestImportFromURL(ImportTestCase):
|
||||||
'''Tests downloading an image over HTTP.'''
|
'''Tests downloading an image over HTTP.'''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue