kubeadm: Fix fuzzer test for NodeRegistrationOptions

The fuzzer test for NodeRegistrationOptions is defaulting the CRISocket member.
This is a left over from the times this member was statically defaulted in the
config. Now that the member is dynamically defaulted, setting CRISocket to foo
can cause issues to get undetected by the fuzzer test with this member.

The resolution is to stop setting CRISocket in the fuzzer test.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This commit is contained in:
Rostislav M. Georgiev 2019-03-11 14:03:36 +02:00
parent cd9e590178
commit 2c4a3ae24c

View File

@ -31,7 +31,6 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
fuzzInitConfiguration,
fuzzClusterConfiguration,
fuzzComponentConfigs,
fuzzNodeRegistration,
fuzzDNS,
fuzzLocalEtcd,
fuzzNetworking,
@ -84,13 +83,6 @@ func fuzzInitConfiguration(obj *kubeadm.InitConfiguration, c fuzz.Continue) {
}
}
func fuzzNodeRegistration(obj *kubeadm.NodeRegistrationOptions, c fuzz.Continue) {
c.FuzzNoCustom(obj)
// Pinning values for fields that get defaults if fuzz value is empty string or nil (thus making the round trip test fail)
obj.CRISocket = "foo"
}
func fuzzClusterConfiguration(obj *kubeadm.ClusterConfiguration, c fuzz.Continue) {
c.FuzzNoCustom(obj)