mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #125080 from TommyStarK/unit-tests/kubelet-apis-config-validation
kubelet/apis/config/validation: improve unit test coverage
This commit is contained in:
		@@ -635,6 +635,27 @@ func TestValidateKubeletConfiguration(t *testing.T) {
 | 
			
		||||
			return config
 | 
			
		||||
		},
 | 
			
		||||
		errMsg: `invalid configuration: pod logs path "/🧪" mut contains ASCII characters only`,
 | 
			
		||||
	}, {
 | 
			
		||||
		name: "invalid ContainerRuntimeEndpoint",
 | 
			
		||||
		configure: func(conf *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration {
 | 
			
		||||
			conf.ContainerRuntimeEndpoint = ""
 | 
			
		||||
			return conf
 | 
			
		||||
		},
 | 
			
		||||
		errMsg: "invalid configuration: the containerRuntimeEndpoint was not specified or empty",
 | 
			
		||||
	}, {
 | 
			
		||||
		name: "invalid Logging configuration",
 | 
			
		||||
		configure: func(conf *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration {
 | 
			
		||||
			conf.Logging.Format = "invalid"
 | 
			
		||||
			return conf
 | 
			
		||||
		},
 | 
			
		||||
		errMsg: "logging.format: Invalid value: \"invalid\": Unsupported log format",
 | 
			
		||||
	}, {
 | 
			
		||||
		name: "invalid FeatureGate",
 | 
			
		||||
		configure: func(conf *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration {
 | 
			
		||||
			conf.FeatureGates["invalid"] = true
 | 
			
		||||
			return conf
 | 
			
		||||
		},
 | 
			
		||||
		errMsg: "unrecognized feature gate: invalid",
 | 
			
		||||
	},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user