Browse code

Update test-unit for client module

Signed-off-by: Derek McGowan <derek@mcg.dev>

Derek McGowan authored on 2025/07/03 01:29:16
Showing 1 changed files
... ...
@@ -18,8 +18,9 @@ TESTDIRS="${TESTDIRS:-./...}"
18 18
 exclude_paths='/vendor/|/integration'
19 19
 pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
20 20
 
21
-base_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings -v "/libnetwork" | grep --fixed-strings -v "/docker/docker/api" || :)
21
+base_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings -v "/libnetwork" | grep --fixed-strings -v "/docker/docker/api" | grep --fixed-strings -v "/docker/docker/client" || :)
22 22
 api_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings "docker/docker/api" | sed 's/docker\/docker/moby\/moby/' || :)
23
+client_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings "docker/docker/client" | sed 's/docker\/docker/moby\/moby/' || :)
23 24
 libnetwork_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings "/libnetwork" || :)
24 25
 
25 26
 echo "${libnetwork_pkg_list}" | grep --fixed-strings "libnetwork/drivers/bridge" \
... ...
@@ -51,6 +52,18 @@ if [ -n "${api_pkg_list}" ]; then
51 51
 	cd ..
52 52
 fi
53 53
 
54
+if [ -n "${client_pkg_list}" ]; then
55
+	cd client
56
+	GO111MODULE=on gotestsum --format=standard-quiet --jsonfile=../bundles/go-test-report-client.json --junitfile=../bundles/junit-report-client.xml -- \
57
+		"${BUILDFLAGS[@]}" \
58
+		-cover \
59
+		-coverprofile=../bundles/coverage-client.out \
60
+		-covermode=atomic \
61
+		${TESTFLAGS} \
62
+		${client_pkg_list}
63
+	cd ..
64
+fi
65
+
54 66
 if [ -n "${libnetwork_pkg_list}" ]; then
55 67
 	rerun_flaky=1
56 68