Kaydet (Commit) 5fb7811c authored tarafından Joffrey F's avatar Joffrey F

Use experimental engine for testing in Jenkins/Makefile

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 54244d0a
...@@ -63,7 +63,7 @@ def runTests = { Map settings -> ...@@ -63,7 +63,7 @@ def runTests = { Map settings ->
def testContainerName = "dpy-tests-\$BUILD_NUMBER-\$EXECUTOR_NUMBER-${pythonVersion}-${dockerVersion}" def testContainerName = "dpy-tests-\$BUILD_NUMBER-\$EXECUTOR_NUMBER-${pythonVersion}-${dockerVersion}"
try { try {
sh """docker run -d --name ${dindContainerName} -v /tmp --privileged \\ sh """docker run -d --name ${dindContainerName} -v /tmp --privileged \\
dockerswarm/dind:${dockerVersion} docker daemon -H tcp://0.0.0.0:2375 dockerswarm/dind:${dockerVersion} docker daemon -H tcp://0.0.0.0:2375 --experimental
""" """
sh """docker run \\ sh """docker run \\
--name ${testContainerName} --volumes-from ${dindContainerName} \\ --name ${testContainerName} --volumes-from ${dindContainerName} \\
......
...@@ -45,7 +45,7 @@ integration-test-py3: build-py3 ...@@ -45,7 +45,7 @@ integration-test-py3: build-py3
integration-dind: build build-py3 integration-dind: build build-py3
docker rm -vf dpy-dind || : docker rm -vf dpy-dind || :
docker run -d --name dpy-dind --privileged dockerswarm/dind:1.13.1 docker daemon\ docker run -d --name dpy-dind --privileged dockerswarm/dind:1.13.1 docker daemon\
-H tcp://0.0.0.0:2375 -H tcp://0.0.0.0:2375 --experimental
docker run --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=1.26"\ docker run --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=1.26"\
--link=dpy-dind:docker docker-sdk-python py.test tests/integration --link=dpy-dind:docker docker-sdk-python py.test tests/integration
docker run --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=1.26"\ docker run --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=1.26"\
...@@ -59,7 +59,7 @@ integration-dind-ssl: build-dind-certs build build-py3 ...@@ -59,7 +59,7 @@ integration-dind-ssl: build-dind-certs build build-py3
--env="DOCKER_CERT_PATH=/certs" --volumes-from dpy-dind-certs --name dpy-dind-ssl\ --env="DOCKER_CERT_PATH=/certs" --volumes-from dpy-dind-certs --name dpy-dind-ssl\
-v /tmp --privileged dockerswarm/dind:1.13.1 docker daemon --tlsverify\ -v /tmp --privileged dockerswarm/dind:1.13.1 docker daemon --tlsverify\
--tlscacert=/certs/ca.pem --tlscert=/certs/server-cert.pem\ --tlscacert=/certs/ca.pem --tlscert=/certs/server-cert.pem\
--tlskey=/certs/server-key.pem -H tcp://0.0.0.0:2375 --tlskey=/certs/server-key.pem -H tcp://0.0.0.0:2375 --experimental
docker run --rm --volumes-from dpy-dind-ssl --env="DOCKER_HOST=tcp://docker:2375"\ docker run --rm --volumes-from dpy-dind-ssl --env="DOCKER_HOST=tcp://docker:2375"\
--env="DOCKER_TLS_VERIFY=1" --env="DOCKER_CERT_PATH=/certs" --env="DOCKER_TEST_API_VERSION=1.26"\ --env="DOCKER_TLS_VERIFY=1" --env="DOCKER_CERT_PATH=/certs" --env="DOCKER_TEST_API_VERSION=1.26"\
--link=dpy-dind-ssl:docker docker-sdk-python py.test tests/integration --link=dpy-dind-ssl:docker docker-sdk-python py.test tests/integration
......
...@@ -4,6 +4,7 @@ import random ...@@ -4,6 +4,7 @@ import random
import time import time
import docker import docker
import six
from ..helpers import ( from ..helpers import (
force_leave_swarm, requires_api_version, requires_experimental force_leave_swarm, requires_api_version, requires_experimental
...@@ -108,6 +109,8 @@ class ServiceTest(BaseAPIIntegrationTest): ...@@ -108,6 +109,8 @@ class ServiceTest(BaseAPIIntegrationTest):
assert self.get_service_container(name, include_stopped=True) assert self.get_service_container(name, include_stopped=True)
logs = self.client.service_logs(svc_id, stdout=True, is_tty=False) logs = self.client.service_logs(svc_id, stdout=True, is_tty=False)
log_line = next(logs) log_line = next(logs)
if six.PY3:
log_line = log_line.decode('utf-8')
assert 'hello\n' in log_line assert 'hello\n' in log_line
assert 'com.docker.swarm.service.id={}'.format( assert 'com.docker.swarm.service.id={}'.format(
svc_id['ID'] svc_id['ID']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment