You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can unit test and benchmark the performance of each endpoint in
574
-
[apiserver/pkg/endpoints/apiserver_test.go](https://github.com/kubernetes/kubernetes/blob/dadecb2c8932fd28de9dfb94edbc7bdac7d0d28f/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go). We will need to test that requests
575
-
fail with invalid fields for all types of fields (embedding, free-form fields,
576
-
etc).
576
+
##### Unit tests
577
+
[alpha and beta]
578
+
Logic that is changed in the apiextensions schema package (i.e. objectmeta
579
+
algorithm and pruning algorithm) will be thoroughly unit tested as well as
580
+
changes made to the
581
+
apimachinery runtime converter and json decoding.
577
582
578
-
Additionally, we can add integration testing for all endpoints in
[apiserver/endpoints/handlers/rest_test.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go) to detect unknown and duplicate fields.
580
585
581
-
We will also have additional testing for changes to the strategic merge patch
It tests the cross product of all valid permutations along the dimensions of:
593
+
* request type (Create vs Update vs Patch)
594
+
* data format (json, yaml, json patch, json merge patch, SMP patch, apply
595
+
(create), apply (update))
596
+
* schema type (typed/builtin, CRD/untyped with schema, CRD/untyped without
597
+
schema)
598
+
599
+
600
+
601
+
##### e2e tests
602
+
[beta]
603
+
With field validation on by default in beta, we will modify
604
+
[test/e2e/kubectl/kubectl.go](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl/kubectl.go) to ensure that kubectl defaults to using server side field validation and detects unknown/duplicate fields as expected.
584
605
585
606
### Graduation Criteria
586
607
<!--
@@ -616,12 +637,16 @@ Below are some examples to consider, in addition to the aforementioned [maturity
616
637
617
638
#### Beta
618
639
619
-
-[] kubectl validate flag offers ability to perform server-side validation
620
-
-[] endpoints handler unit testing of field validation
621
-
-[] customresource handler unit testing of field validation
622
-
-[] field validation integration tests check for exact match of strict errors
623
-
-[] In tree NestedObjectDecoders no longer short circuit on strict decoding
640
+
-[x] kubectl validate flag offers ability to perform server-side validation
641
+
-[x] endpoints handler unit testing of field validation
642
+
-[x] customresource handler unit testing of field validation
643
+
-[x] field validation integration tests check for exact match of strict errors
644
+
-[x] In tree NestedObjectDecoders no longer short circuit on strict decoding
0 commit comments