mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #80153 from ii/promote-api-metadata-return-value
Promote API metadata return value
This commit is contained in:
commit
3aa4fba780
1
test/conformance/testdata/conformance.txt
vendored
1
test/conformance/testdata/conformance.txt
vendored
@ -9,6 +9,7 @@ test/e2e/apimachinery/garbage_collector.go: "should not delete dependents that h
|
||||
test/e2e/apimachinery/garbage_collector.go: "should not be blocked by dependency circle"
|
||||
test/e2e/apimachinery/namespace.go: "should ensure that all pods are removed when a namespace is deleted"
|
||||
test/e2e/apimachinery/namespace.go: "should ensure that all services are removed when a namespace is deleted"
|
||||
test/e2e/apimachinery/table_conversion.go: "should return a 406 for a backend which does not implement metadata"
|
||||
test/e2e/apimachinery/watch.go: "should observe add, update, and delete watch notifications on configmaps"
|
||||
test/e2e/apimachinery/watch.go: "should be able to start watching from a specific resource version"
|
||||
test/e2e/apimachinery/watch.go: "should be able to restart watching from the last resource version observed by the previous watch"
|
||||
|
@ -145,7 +145,13 @@ var _ = SIGDescribe("Servers with support for Table transformation", func() {
|
||||
e2elog.Logf("Table:\n%s", out)
|
||||
})
|
||||
|
||||
ginkgo.It("should return a 406 for a backend which does not implement metadata", func() {
|
||||
/*
|
||||
Release : v1.16
|
||||
Testname: API metadata HTTP return
|
||||
Description: Issue a HTTP request to the API.
|
||||
HTTP request MUST return a HTTP status code of 406.
|
||||
*/
|
||||
framework.ConformanceIt("should return a 406 for a backend which does not implement metadata", func() {
|
||||
c := f.ClientSet
|
||||
|
||||
table := &metav1beta1.Table{}
|
||||
@ -157,7 +163,7 @@ var _ = SIGDescribe("Servers with support for Table transformation", func() {
|
||||
},
|
||||
},
|
||||
}
|
||||
err := c.AuthorizationV1().RESTClient().Post().Resource("selfsubjectaccessreviews").SetHeader("Accept", "application/json;as=Table;v=v1beta1;g=meta.k8s.io").Body(sar).Do().Into(table)
|
||||
err := c.AuthorizationV1().RESTClient().Post().Resource("selfsubjectaccessreviews").SetHeader("Accept", "application/json;as=Table;v=v1;g=meta.k8s.io").Body(sar).Do().Into(table)
|
||||
framework.ExpectError(err, "failed to return error when posting self subject access review: %+v, to a backend that does not implement metadata", sar)
|
||||
framework.ExpectEqual(err.(errors.APIStatus).Status().Code, int32(406))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user