mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
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:
@@ -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 #
|
||||
###########################
|
||||
|
Reference in New Issue
Block a user