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).
573
+
##### Unit tests
574
+
[alpha and beta]
575
+
Logic that is changed in the apiextensions schema package (i.e. objectmeta
576
+
algorithm and pruning algorithm) will be thoroughly unit tested as well as
577
+
changes made to the
578
+
apimachinery runtime converter and json decoding.
577
579
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
582
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:
590
+
* request type (Create vs Update vs Patch)
591
+
* data format (json, yaml, json patch, json merge patch, SMP patch, apply
592
+
(create), apply (update))
593
+
* schema type (typed/builtin, CRD/untyped with schema, CRD/untyped without
594
+
schema)
595
+
596
+
597
+
598
+
##### e2e tests
599
+
[beta]
600
+
With field validation on by default in beta, we will modify
601
+
[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
602
585
603
### Graduation Criteria
586
604
<!--
@@ -616,12 +634,16 @@ Below are some examples to consider, in addition to the aforementioned [maturity
616
634
617
635
#### Beta
618
636
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
637
+
-[x] kubectl validate flag offers ability to perform server-side validation
638
+
-[x] endpoints handler unit testing of field validation
639
+
-[x] customresource handler unit testing of field validation
640
+
-[x] field validation integration tests check for exact match of strict errors
641
+
-[x] In tree NestedObjectDecoders no longer short circuit on strict decoding
-[ ] Unknown/Duplicate fields are properly detected in the metadata at both the
644
+
root level and within embedded objects
645
+
[#109215](https://github.com/kubernetes/kubernetes/issues/109215),[#109316](https://github.com/kubernetes/kubernetes/pull/109316), and
0 commit comments