From 2c4a3ae24cd72e1e93237a8deb0e4fe91fb76e6a Mon Sep 17 00:00:00 2001 From: "Rostislav M. Georgiev" Date: Mon, 11 Mar 2019 14:03:36 +0200 Subject: [PATCH] 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 --- cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go b/cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go index 414ece80b93..053a52bc647 100644 --- a/cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go +++ b/cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go @@ -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)