mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Update unit tests for api module
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -18,7 +18,8 @@ TESTDIRS="${TESTDIRS:-./...}"
|
||||
exclude_paths='/vendor/|/integration'
|
||||
pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
|
||||
|
||||
base_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings -v "/libnetwork" || :)
|
||||
base_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings -v "/libnetwork" | grep --fixed-strings -v "/docker/docker/api" || :)
|
||||
api_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings "docker/docker/api" | sed 's/docker\/docker/moby\/moby/' || :)
|
||||
libnetwork_pkg_list=$(echo "${pkg_list}" | grep --fixed-strings "/libnetwork" || :)
|
||||
|
||||
echo "${libnetwork_pkg_list}" | grep --fixed-strings "libnetwork/drivers/bridge" \
|
||||
@@ -37,6 +38,19 @@ if [ -n "${base_pkg_list}" ]; then
|
||||
${TESTFLAGS} \
|
||||
${base_pkg_list}
|
||||
fi
|
||||
|
||||
if [ -n "${api_pkg_list}" ]; then
|
||||
cd api
|
||||
GO111MODULE=on gotestsum --format=standard-quiet --jsonfile=../bundles/go-test-report-api.json --junitfile=../bundles/junit-report-api.xml -- \
|
||||
"${BUILDFLAGS[@]}" \
|
||||
-cover \
|
||||
-coverprofile=../bundles/coverage-api.out \
|
||||
-covermode=atomic \
|
||||
${TESTFLAGS} \
|
||||
${api_pkg_list}
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [ -n "${libnetwork_pkg_list}" ]; then
|
||||
rerun_flaky=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user