Merge pull request #46755 from CaoShuFeng/cani-test-cmd

Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

add cmd test for kubectl auth can-i

**Release note**:

```
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-07-19 00:06:23 -07:00
committed by GitHub
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. "*"