Use experimental engine for testing in Jenkins/Makefile

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2017-03-13 17:29:50 -07:00
parent daac15c1fa
commit aeb5479fd5
3 changed files with 6 additions and 3 deletions

2
Jenkinsfile vendored
View File

@ -63,7 +63,7 @@ def runTests = { Map settings ->
def testContainerName = "dpy-tests-\$BUILD_NUMBER-\$EXECUTOR_NUMBER-${pythonVersion}-${dockerVersion}"
try {
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 \\
--name ${testContainerName} --volumes-from ${dindContainerName} \\

View File

@ -45,7 +45,7 @@ integration-test-py3: build-py3
integration-dind: build build-py3
docker rm -vf dpy-dind || :
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"\
--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"\
@ -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\
-v /tmp --privileged dockerswarm/dind:1.13.1 docker daemon --tlsverify\
--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"\
--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

View File

@ -4,6 +4,7 @@ import random
import time
import docker
import six
from ..helpers import (
force_leave_swarm, requires_api_version, requires_experimental
@ -108,6 +109,8 @@ class ServiceTest(BaseAPIIntegrationTest):
assert self.get_service_container(name, include_stopped=True)
logs = self.client.service_logs(svc_id, stdout=True, is_tty=False)
log_line = next(logs)
if six.PY3:
log_line = log_line.decode('utf-8')
assert 'hello\n' in log_line
assert 'com.docker.swarm.service.id={}'.format(
svc_id['ID']