1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #40499 from thaJeztah/docker_py_api_version

docker-py: override default API version to run all tests
This commit is contained in:
Tibor Vass 2020-07-16 16:12:22 +02:00 committed by GitHub
commit a13fd15686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,10 @@ source hack/make/.integration-test-helpers
#: exit status 128
: "${DOCKER_PY_COMMIT:=4.2.1}"
# Override the API version used to make sure all tests are run
# TODO remove this or unset this after https://github.com/docker/docker-py/pull/2512 is merged
: "${DOCKER_PY_TEST_API_VERSION:=1.39}"
# custom options to pass py.test
# TODO remove these skip once we update to a docker-py version that has https://github.com/docker/docker-py/pull/2549: CreateContainerTest::test_invalid_log_driver_raises_exception
#
@ -57,7 +61,7 @@ source hack/make/.integration-test-helpers
(
[ -n "${TESTDEBUG}" ] && set -x
# shellcheck disable=SC2086,SC2140
exec docker run --rm ${run_opts} --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
exec docker run --rm ${run_opts} -e DOCKER_TEST_API_VERSION="${DOCKER_PY_TEST_API_VERSION}" --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
)
bundle .integration-daemon-stop
) 2>&1 | tee -a "$DEST/test.log"