Add UT for pkg/cmd/cli/backup (#6400)

Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
danfengliu
2023-06-21 11:10:13 +08:00
committed by GitHub
parent 6f3adcf728
commit ef443fece0
33 changed files with 2984 additions and 32 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 120s -coverprofile=coverage.out "${TARGETS[@]}"
XDG_CACHE_HOME=/tmp/ go test -installsuffix "static" -short -timeout 1200s -coverprofile=coverage.out "${TARGETS[@]}"
echo "Success!"