test: remove platform related timeout values
These were dependent on the DOCKER_ENGINE_GOARCH environment variable but this var was no longer set. There was also some weird check to see if the architecture is "windows" which doesn't make sense. Seeing how nothing failed ever since the TIMEOUT was no longer platform-dependent we can safely remove this check. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
d390f86080
commit
75097cf09a
2 changed files with 4 additions and 33 deletions
|
@ -14,6 +14,7 @@ source "${MAKEDIR}/.go-autogen"
|
|||
|
||||
# Set defaults
|
||||
: "${TEST_REPEAT:=1}"
|
||||
: "${TIMEOUT:=5m}"
|
||||
: "${TESTFLAGS:=}"
|
||||
: "${TESTDEBUG:=}"
|
||||
: "${TESTCOVERAGE:=}"
|
||||
|
@ -54,7 +55,7 @@ else
|
|||
fi
|
||||
|
||||
run_test_integration() {
|
||||
set_platform_timeout
|
||||
set_repeat_timeout
|
||||
local failed=0
|
||||
if [ -z "${TEST_SKIP_INTEGRATION}" ]; then
|
||||
if ! run_test_integration_suites "${integration_api_dirs}"; then
|
||||
|
@ -181,7 +182,6 @@ test_env() {
|
|||
DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \
|
||||
DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
|
||||
DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
|
||||
DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \
|
||||
DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
|
||||
DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
|
||||
DOCKER_HOST="$DOCKER_HOST" \
|
||||
|
@ -201,16 +201,7 @@ test_env() {
|
|||
)
|
||||
}
|
||||
|
||||
set_platform_timeout() {
|
||||
# Test timeout.
|
||||
if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then
|
||||
: "${TIMEOUT:=10m}"
|
||||
elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then
|
||||
: "${TIMEOUT:=8m}"
|
||||
else
|
||||
: "${TIMEOUT:=5m}"
|
||||
fi
|
||||
|
||||
set_repeat_timeout() {
|
||||
if [ "${TEST_REPEAT}" -gt 1 ]; then
|
||||
# TIMEOUT needs to take TEST_REPEAT into account, or a premature time out may happen.
|
||||
# The following ugliness will:
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e -u -o pipefail
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
ARCH="amd64"
|
||||
fi
|
||||
|
||||
export DOCKER_ENGINE_GOARCH=${DOCKER_ENGINE_GOARCH:-${ARCH}}
|
||||
|
||||
# Set defaults
|
||||
: ${TESTFLAGS:=}
|
||||
: ${TESTDEBUG:=}
|
||||
|
@ -18,13 +11,12 @@ integration_api_dirs=${TEST_INTEGRATION_DIR:-"$(
|
|||
)"}
|
||||
|
||||
run_test_integration() {
|
||||
set_platform_timeout
|
||||
run_test_integration_suites
|
||||
run_test_integration_legacy_suites
|
||||
}
|
||||
|
||||
run_test_integration_suites() {
|
||||
local flags="-test.v -test.timeout=${TIMEOUT:-10m} $TESTFLAGS"
|
||||
local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS"
|
||||
for dir in $integration_api_dirs; do
|
||||
if ! (
|
||||
cd $dir
|
||||
|
@ -53,7 +45,6 @@ test_env() {
|
|||
DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \
|
||||
DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
|
||||
DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
|
||||
DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \
|
||||
DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
|
||||
DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
|
||||
DOCKER_HOST="$DOCKER_HOST" \
|
||||
|
@ -69,16 +60,5 @@ test_env() {
|
|||
)
|
||||
}
|
||||
|
||||
set_platform_timeout() {
|
||||
# Test timeout.
|
||||
if [ "${DOCKER_ENGINE_GOARCH}" = "arm64" ] || [ "${DOCKER_ENGINE_GOARCH}" = "arm" ]; then
|
||||
: ${TIMEOUT:=10m}
|
||||
elif [ "${DOCKER_ENGINE_GOARCH}" = "windows" ]; then
|
||||
: ${TIMEOUT:=8m}
|
||||
else
|
||||
: ${TIMEOUT:=5m}
|
||||
fi
|
||||
}
|
||||
|
||||
sh /scripts/build-empty-images.sh
|
||||
run_test_integration
|
||||
|
|
Loading…
Add table
Reference in a new issue