From d9928e30825a8e2990aaecd766f38dba2a852dd4 Mon Sep 17 00:00:00 2001 From: LY-today <724102053@qq.com> Date: Fri, 20 Dec 2024 18:36:54 +0800 Subject: [PATCH] ci: goimports and gofmt two Signed-off-by: LY-today <724102053@qq.com> --- .../node_resources_fit_plus.go | 16 ++++++++++ .../node_resources_fit_plus_test.go | 32 +++++++++++++++---- .../scarce_resource_avoidance.go | 16 ++++++++++ .../scarce_resource_avoidance_test.go | 16 ++++++++++ 4 files changed, 73 insertions(+), 7 deletions(-) diff --git a/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go b/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go index d4397bf7a..ad8837c8d 100644 --- a/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go +++ b/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Koordinator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package noderesourcesfitplus import ( diff --git a/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus_test.go b/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus_test.go index 85a16bd5f..0ee87ee2b 100644 --- a/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus_test.go +++ b/pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus_test.go @@ -1,13 +1,25 @@ +/* +Copyright 2022 The Koordinator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package noderesourcesfitplus import ( "context" - koordinatorclientset "github.com/koordinator-sh/koordinator/pkg/client/clientset/versioned" - koordfake "github.com/koordinator-sh/koordinator/pkg/client/clientset/versioned/fake" - koordinatorinformers "github.com/koordinator-sh/koordinator/pkg/client/informers/externalversions" - "github.com/koordinator-sh/koordinator/pkg/scheduler/apis/config" - "github.com/koordinator-sh/koordinator/pkg/scheduler/apis/config/v1beta3" - "github.com/koordinator-sh/koordinator/pkg/scheduler/frameworkext" + "testing" + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" @@ -22,7 +34,13 @@ import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" schedulertesting "k8s.io/kubernetes/pkg/scheduler/testing" - "testing" + + koordinatorclientset "github.com/koordinator-sh/koordinator/pkg/client/clientset/versioned" + koordfake "github.com/koordinator-sh/koordinator/pkg/client/clientset/versioned/fake" + koordinatorinformers "github.com/koordinator-sh/koordinator/pkg/client/informers/externalversions" + "github.com/koordinator-sh/koordinator/pkg/scheduler/apis/config" + "github.com/koordinator-sh/koordinator/pkg/scheduler/apis/config/v1beta3" + "github.com/koordinator-sh/koordinator/pkg/scheduler/frameworkext" ) var _ framework.SharedLister = &testSharedLister{} diff --git a/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go b/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go index ca3670b1d..a457f3f01 100644 --- a/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go +++ b/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Koordinator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package scarceresourceavoidance import ( diff --git a/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance_test.go b/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance_test.go index 417f154fc..e5b2f9822 100644 --- a/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance_test.go +++ b/pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Koordinator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package scarceresourceavoidance import (