Browse code

hack: have integration-cli use gotestsum codepath

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 84928be6059084c608f6d071f7121ab42bee721c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Tibor Vass authored on 2019/09/12 06:57:08
Showing 1 changed files
... ...
@@ -47,16 +47,17 @@ integration_api_dirs="${TEST_INTEGRATION_DIR:-$(go list  -test -f '{{- if ne .Fo
47 47
 run_test_integration() {
48 48
 	set_platform_timeout
49 49
 	if [ -z "${TEST_SKIP_INTEGRATION}" ]; then
50
-		run_test_integration_suites
50
+		run_test_integration_suites "${integration_api_dirs}"
51 51
 	fi
52 52
 	if [ -z "${TEST_SKIP_INTEGRATION_CLI}" ]; then
53
-		run_test_integration_legacy_suites
53
+		TIMEOUT=360m run_test_integration_suites integration-cli
54 54
 	fi
55 55
 }
56 56
 
57 57
 run_test_integration_suites() {
58 58
 	local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS"
59
-	for dir in ${integration_api_dirs}; do
59
+	local dirs="$1"
60
+	for dir in ${dirs}; do
60 61
 		if ! (
61 62
 			cd "$dir"
62 63
 			# Create a useful package name based on the tests's $dir. We need to take
... ...
@@ -84,16 +85,6 @@ run_test_integration_suites() {
84 84
 	done
85 85
 }
86 86
 
87
-run_test_integration_legacy_suites() {
88
-	(
89
-		flags="-test.v -test.timeout=360m $TESTFLAGS"
90
-		cd integration-cli
91
-		echo "Running $PWD flags=${flags}"
92
-		# shellcheck disable=SC2086
93
-		test_env ./test.main $flags
94
-	)
95
-}
96
-
97 87
 build_test_suite_binaries() {
98 88
 	if [ -n "${DOCKER_INTEGRATION_TESTS_VERIFIED}" ]; then
99 89
 		echo "Skipping building test binaries; as DOCKER_INTEGRATION_TESTS_VERIFIED is set"