From bc15aca26d5c9181a48666c3ac9f7cab8b258be3 Mon Sep 17 00:00:00 2001 From: kerthcet Date: Sat, 5 Nov 2022 00:30:34 +0800 Subject: [PATCH] Refactor SchedulerConfigFile Rename to SchedulerConfigPath and make it a pointer to be consist with other fields Signed-off-by: kerthcet --- test/integration/scheduler_perf/scheduler_perf_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/integration/scheduler_perf/scheduler_perf_test.go b/test/integration/scheduler_perf/scheduler_perf_test.go index ce5262f07a3..e49df2979ee 100644 --- a/test/integration/scheduler_perf/scheduler_perf_test.go +++ b/test/integration/scheduler_perf/scheduler_perf_test.go @@ -110,8 +110,9 @@ type testCase struct { WorkloadTemplate []op // List of workloads to run under this testCase. Workloads []*workload - // SchedulerConfigFile is the path of scheduler configuration - SchedulerConfigFile string + // SchedulerConfigPath is the path of scheduler configuration + // Optional + SchedulerConfigPath *string // Default path to spec file describing the pods to create. // This path can be overridden in createPodsOp by setting PodTemplatePath . // Optional @@ -645,8 +646,8 @@ func runWorkload(b *testing.B, tc *testCase, w *workload) []DataItem { defer cancel() var cfg *config.KubeSchedulerConfiguration var err error - if len(tc.SchedulerConfigFile) != 0 { - cfg, err = loadSchedulerConfig(tc.SchedulerConfigFile) + if tc.SchedulerConfigPath != nil { + cfg, err = loadSchedulerConfig(*tc.SchedulerConfigPath) if err != nil { b.Fatalf("error loading scheduler config file: %v", err) }