mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
add fuzzer patch to fix tests
This commit is contained in:
parent
60377ba1a3
commit
f0d917a3ca
@ -20,6 +20,7 @@ import (
|
|||||||
fuzz "github.com/google/gofuzz"
|
fuzz "github.com/google/gofuzz"
|
||||||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
"k8s.io/kubernetes/pkg/apis/networking"
|
"k8s.io/kubernetes/pkg/apis/networking"
|
||||||
|
utilpointer "k8s.io/utils/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Funcs returns the fuzzer functions for the networking api group.
|
// Funcs returns the fuzzer functions for the networking api group.
|
||||||
@ -64,5 +65,14 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
func(p *networking.IngressClass, c fuzz.Continue) {
|
||||||
|
c.FuzzNoCustom(p) // fuzz self without calling this function again
|
||||||
|
// default Parameters to Cluster
|
||||||
|
if p.Spec.Parameters == nil || p.Spec.Parameters.Scope == nil {
|
||||||
|
p.Spec.Parameters = &networking.IngressClassParametersReference{
|
||||||
|
Scope: utilpointer.StringPtr(networking.IngressClassParametersReferenceScopeCluster),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user