add cmd test for kubectl auth can-i

This commit is contained in:
Cao Shufeng
2017-06-01 13:56:49 +08:00
parent 78a9e4feba
commit c28efb85ff
2 changed files with 34 additions and 0 deletions

View File

@@ -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. "*"