Merge pull request #40985 from p0lyn0mial/add_shortnames_to_discovery_api

Automatic merge from submit-queue (batch tested with PRs 40980, 40985)

added short names for resources which are exposed during discovery

**What this PR does / why we need it**:
The changes add short names for resources. The short names will be delivered to kubectl during discovery.
This commit is contained in:
Kubernetes Submit Queue
2017-02-07 06:21:10 -08:00
committed by GitHub
50 changed files with 372 additions and 1 deletions

View File

@@ -2818,6 +2818,16 @@ runTests() {
kube::test::get_object_assert rolebinding/sarole "{{range.subjects}}{{.name}}:{{end}}" 'sa-name:'
fi
#########################
# Assert short name #
#########################
kube::log::status "Testing propagation of short names for resources"
output_message=$(kubectl get --raw=/api/v1)
## test if a short name is exported during discovery
kube::test::if_has_string "${output_message}" '{"name":"configmaps","namespaced":true,"kind":"ConfigMap","verbs":\["create","delete","deletecollection","get","list","patch","update","watch"\],"shortNames":\["cm"\]}'
###########################
# POD creation / deletion #
###########################