@@ -85,6 +85,13 @@ def runTests = { Map settings ->
8585 def testNetwork = " dpy-testnet-\$ BUILD_NUMBER-\$ EXECUTOR_NUMBER-${ pythonVersion} -${ dockerVersion} "
8686 withDockerRegistry(credentialsId :' dockerbuildbot-index.docker.io' ) {
8787 try {
88+ // unit tests
89+ sh """ docker run --rm \\
90+ -e 'DOCKER_TEST_API_VERSION=${ apiVersion} ' \\
91+ ${ testImage} \\
92+ py.test -v -rxs --cov=docker tests/unit
93+ """
94+ // integration tests
8895 sh """ docker network create ${ testNetwork} """
8996 sh """ docker run --rm -d --name ${ dindContainerName} -v /tmp --privileged --network ${ testNetwork} \\
9097 ${ imageDindSSH} dockerd -H tcp://0.0.0.0:2375
@@ -95,9 +102,9 @@ def runTests = { Map settings ->
95102 -e 'DOCKER_TEST_API_VERSION=${ apiVersion} ' \\
96103 --network ${ testNetwork} \\
97104 --volumes-from ${ dindContainerName} \\
98- -v ~/.docker /config.json:/root/.docker/config.json \\
105+ -v $D OCKER_CONFIG /config.json:/root/.docker/config.json \\
99106 ${ testImage} \\
100- py.test -v -rxs --cov=docker --ignore= tests/ssh tests/
107+ py.test -v -rxs --cov=docker tests/integration
101108 """
102109 sh """ docker stop ${ dindContainerName} """
103110 // start DIND container with SSH
@@ -111,7 +118,7 @@ def runTests = { Map settings ->
111118 -e 'DOCKER_TEST_API_VERSION=${ apiVersion} ' \\
112119 --network ${ testNetwork} \\
113120 --volumes-from ${ dindContainerName} \\
114- -v ~/.docker /config.json:/root/.docker/config.json \\
121+ -v $D OCKER_CONFIG /config.json:/root/.docker/config.json \\
115122 ${ testImage} \\
116123 py.test -v -rxs --cov=docker tests/ssh
117124 """
0 commit comments