Skip to content

Commit

Permalink
fix koordlet config test
Browse files Browse the repository at this point in the history
  • Loading branch information
j4ckstraw committed Feb 5, 2024
1 parent ffb75fd commit b49f9f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/koordlet/qosmanager/framework/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func Test_NewDefaultConfig(t *testing.T) {
MemoryEvictIntervalSeconds: 1,
MemoryEvictCoolTimeSeconds: 4,
CPUEvictCoolTimeSeconds: 20,
OnlyEvictByAPI: false,
QOSExtensionCfg: &QOSExtensionConfig{FeatureGates: map[string]bool{}},
}
defaultConfig := NewDefaultConfig()
Expand All @@ -47,6 +48,7 @@ func Test_InitFlags(t *testing.T) {
"--memory-evict-cool-time-seconds=8",
"--cpu-evict-cool-time-seconds=40",
"--qos-extension-plugins=test-plugin=true",
"--only-evict-by-api=false",
}
fs := flag.NewFlagSet(cmdArgs[0], flag.ExitOnError)

Expand All @@ -57,6 +59,7 @@ func Test_InitFlags(t *testing.T) {
MemoryEvictIntervalSeconds int
MemoryEvictCoolTimeSeconds int
CPUEvictCoolTimeSeconds int
OnlyEvictByAPI bool
QOSExtensionCfg *QOSExtensionConfig
}
type args struct {
Expand All @@ -76,6 +79,7 @@ func Test_InitFlags(t *testing.T) {
MemoryEvictIntervalSeconds: 2,
MemoryEvictCoolTimeSeconds: 8,
CPUEvictCoolTimeSeconds: 40,
OnlyEvictByAPI: false,
QOSExtensionCfg: &QOSExtensionConfig{FeatureGates: map[string]bool{"test-plugin": true}},
},
args: args{fs: fs},
Expand All @@ -90,6 +94,7 @@ func Test_InitFlags(t *testing.T) {
MemoryEvictIntervalSeconds: tt.fields.MemoryEvictIntervalSeconds,
MemoryEvictCoolTimeSeconds: tt.fields.MemoryEvictCoolTimeSeconds,
CPUEvictCoolTimeSeconds: tt.fields.CPUEvictCoolTimeSeconds,
OnlyEvictByAPI: tt.fields.OnlyEvictByAPI,
QOSExtensionCfg: tt.fields.QOSExtensionCfg,
}
c := NewDefaultConfig()
Expand Down

0 comments on commit b49f9f4

Please sign in to comment.