Ensure MemorySwapConfig can't be set without feature flag

This commit is contained in:
Elana Hashman
2021-06-28 15:07:01 -07:00
parent d4041cb80f
commit 39f32d7286
2 changed files with 5 additions and 1 deletions

View File

@@ -190,8 +190,9 @@ func TestValidateKubeletConfiguration(t *testing.T) {
Logging: componentbaseconfig.LoggingConfiguration{
Format: "",
},
MemorySwap: kubeletconfig.MemorySwapConfiguration{SwapBehavior: kubetypes.UnlimitedSwap},
}
const numErrsErrorCase1 = 29
const numErrsErrorCase1 = 30
if allErrors := ValidateKubeletConfiguration(errorCase1); len(allErrors.(utilerrors.Aggregate).Errors()) != numErrsErrorCase1 {
t.Errorf("expect %d errors, got %v", numErrsErrorCase1, len(allErrors.(utilerrors.Aggregate).Errors()))
}