Merge pull request #80153 from ii/promote-api-metadata-return-value

Promote API metadata return value
This commit is contained in:
Kubernetes Prow Robot 2019-07-18 21:33:23 -07:00 committed by GitHub
commit 3aa4fba780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

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

View File

@ -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))
})