mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
add cmd test for kubectl auth can-i
This commit is contained in:
@@ -286,6 +286,18 @@ kube::test::if_has_not_string() {
|
||||
fi
|
||||
}
|
||||
|
||||
kube::test::if_empty_string() {
|
||||
local match=$1
|
||||
if [ -n "$match" ]; then
|
||||
echo "$match is not empty"
|
||||
caller
|
||||
return 1
|
||||
else
|
||||
echo "Successful"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Returns true if the required resource is part of supported resources.
|
||||
# Expects env vars:
|
||||
# SUPPORTED_RESOURCES: Array of all resources supported by the apiserver. "*"
|
||||
|
Reference in New Issue
Block a user