Merge pull request #105916 from kevindelgado/validation-unify-all
Server Side Strict Field Validation
This commit is contained in:
@@ -73,19 +73,19 @@ import (
|
||||
"k8s.io/kubernetes/test/integration/framework"
|
||||
)
|
||||
|
||||
func setup(t *testing.T, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
func setup(t testing.TB, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
return setupWithResources(t, groupVersions, nil)
|
||||
}
|
||||
|
||||
func setupWithOptions(t *testing.T, opts *framework.ControlPlaneConfigOptions, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
func setupWithOptions(t testing.TB, opts *framework.ControlPlaneConfigOptions, groupVersions ...schema.GroupVersion) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
return setupWithResourcesWithOptions(t, opts, groupVersions, nil)
|
||||
}
|
||||
|
||||
func setupWithResources(t *testing.T, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
func setupWithResources(t testing.TB, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
return setupWithResourcesWithOptions(t, &framework.ControlPlaneConfigOptions{}, groupVersions, resources)
|
||||
}
|
||||
|
||||
func setupWithResourcesWithOptions(t *testing.T, opts *framework.ControlPlaneConfigOptions, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
func setupWithResourcesWithOptions(t testing.TB, opts *framework.ControlPlaneConfigOptions, groupVersions []schema.GroupVersion, resources []schema.GroupVersionResource) (*httptest.Server, clientset.Interface, framework.CloseFunc) {
|
||||
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfigWithOptions(opts)
|
||||
if len(groupVersions) > 0 || len(resources) > 0 {
|
||||
resourceConfig := controlplane.DefaultAPIResourceConfigSource()
|
||||
|
||||
2903
test/integration/apiserver/field_validation_test.go
Normal file
2903
test/integration/apiserver/field_validation_test.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user