Переглянути джерело

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>
Djordje Lukic 1 рік тому
батько
коміт
75097cf09a
2 змінених файлів з 4 додано та 33 видалено
  1. 3 12
      hack/make/.integration-test-helpers
  2. 1 21
      hack/test/e2e-run.sh

+ 3 - 12
hack/make/.integration-test-helpers

@@ -14,6 +14,7 @@ source "${MAKEDIR}/.go-autogen"
 
 
 # Set defaults
 # Set defaults
 : "${TEST_REPEAT:=1}"
 : "${TEST_REPEAT:=1}"
+: "${TIMEOUT:=5m}"
 : "${TESTFLAGS:=}"
 : "${TESTFLAGS:=}"
 : "${TESTDEBUG:=}"
 : "${TESTDEBUG:=}"
 : "${TESTCOVERAGE:=}"
 : "${TESTCOVERAGE:=}"
@@ -54,7 +55,7 @@ else
 fi
 fi
 
 
 run_test_integration() {
 run_test_integration() {
-	set_platform_timeout
+	set_repeat_timeout
 	local failed=0
 	local failed=0
 	if [ -z "${TEST_SKIP_INTEGRATION}" ]; then
 	if [ -z "${TEST_SKIP_INTEGRATION}" ]; then
 		if ! run_test_integration_suites "${integration_api_dirs}"; 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_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \
 			DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
 			DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
 			DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
 			DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
-			DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \
 			DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
 			DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
 			DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
 			DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
 			DOCKER_HOST="$DOCKER_HOST" \
 			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
 	if [ "${TEST_REPEAT}" -gt 1 ]; then
 		# TIMEOUT needs to take TEST_REPEAT into account, or a premature time out may happen.
 		# TIMEOUT needs to take TEST_REPEAT into account, or a premature time out may happen.
 		# The following ugliness will:
 		# The following ugliness will:

+ 1 - 21
hack/test/e2e-run.sh

@@ -1,13 +1,6 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 set -e -u -o pipefail
 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
 # Set defaults
 : ${TESTFLAGS:=}
 : ${TESTFLAGS:=}
 : ${TESTDEBUG:=}
 : ${TESTDEBUG:=}
@@ -18,13 +11,12 @@ integration_api_dirs=${TEST_INTEGRATION_DIR:-"$(
 )"}
 )"}
 
 
 run_test_integration() {
 run_test_integration() {
-	set_platform_timeout
 	run_test_integration_suites
 	run_test_integration_suites
 	run_test_integration_legacy_suites
 	run_test_integration_legacy_suites
 }
 }
 
 
 run_test_integration_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
 	for dir in $integration_api_dirs; do
 		if ! (
 		if ! (
 			cd $dir
 			cd $dir
@@ -53,7 +45,6 @@ test_env() {
 			DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \
 			DOCKER_INTEGRATION_DAEMON_DEST="$DOCKER_INTEGRATION_DAEMON_DEST" \
 			DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
 			DOCKER_TLS_VERIFY="$DOCKER_TEST_TLS_VERIFY" \
 			DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
 			DOCKER_CERT_PATH="$DOCKER_TEST_CERT_PATH" \
-			DOCKER_ENGINE_GOARCH="$DOCKER_ENGINE_GOARCH" \
 			DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
 			DOCKER_GRAPHDRIVER="$DOCKER_GRAPHDRIVER" \
 			DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
 			DOCKER_USERLANDPROXY="$DOCKER_USERLANDPROXY" \
 			DOCKER_HOST="$DOCKER_HOST" \
 			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
 sh /scripts/build-empty-images.sh
 run_test_integration
 run_test_integration