add ut for pkg client factory (#6371)

Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
danfengliu
2023-06-09 09:59:19 +08:00
committed by GitHub
parent 5a4f2abd4f
commit 114193ae3b
2 changed files with 89 additions and 4 deletions

View File

@@ -42,5 +42,5 @@ fi
# but the user and group don't exist inside the container, when the code(https://github.com/kubernetes-sigs/controller-runtime/blob/v0.10.2/pkg/internal/testing/addr/manager.go#L44)
# tries to get the cache directory, it gets the directory "/" and then get the permission error when trying to create directory under "/".
# Specifying the cache directory by environment variable "XDG_CACHE_HOME" to workaround it
XDG_CACHE_HOME=/tmp/ go test -installsuffix "static" -short -timeout 60s -coverprofile=coverage.out "${TARGETS[@]}"
XDG_CACHE_HOME=/tmp/ go test -installsuffix "static" -short -timeout 120s -coverprofile=coverage.out "${TARGETS[@]}"
echo "Success!"