mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
Fix golangci-lint Failures For 1.30.0 Upgrade
This commit is contained in:
2
Makefile
2
Makefile
@@ -22,7 +22,7 @@ LDFLAG_LOCATION=sigs.k8s.io/descheduler/cmd/descheduler/app
|
|||||||
|
|
||||||
LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}.buildDate=${BUILD} -X ${LDFLAG_LOCATION}.gitCommit=${COMMIT}"
|
LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}.buildDate=${BUILD} -X ${LDFLAG_LOCATION}.gitCommit=${COMMIT}"
|
||||||
|
|
||||||
GOLANGCI_VERSION := v1.15.0
|
GOLANGCI_VERSION := v1.30.0
|
||||||
HAS_GOLANGCI := $(shell ls _output/bin/golangci-lint)
|
HAS_GOLANGCI := $(shell ls _output/bin/golangci-lint)
|
||||||
|
|
||||||
# REGISTRY is the container registry to push
|
# REGISTRY is the container registry to push
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/client-go/informers"
|
"k8s.io/client-go/informers"
|
||||||
"k8s.io/client-go/kubernetes/fake"
|
"k8s.io/client-go/kubernetes/fake"
|
||||||
@@ -69,7 +69,7 @@ func TestReadyNodesWithNodeSelector(t *testing.T) {
|
|||||||
sharedInformerFactory := informers.NewSharedInformerFactory(fakeClient, 0)
|
sharedInformerFactory := informers.NewSharedInformerFactory(fakeClient, 0)
|
||||||
nodeInformer := sharedInformerFactory.Core().V1().Nodes()
|
nodeInformer := sharedInformerFactory.Core().V1().Nodes()
|
||||||
|
|
||||||
stopChannel := make(chan struct{}, 0)
|
stopChannel := make(chan struct{})
|
||||||
sharedInformerFactory.Start(stopChannel)
|
sharedInformerFactory.Start(stopChannel)
|
||||||
sharedInformerFactory.WaitForCacheSync(stopChannel)
|
sharedInformerFactory.WaitForCacheSync(stopChannel)
|
||||||
defer close(stopChannel)
|
defer close(stopChannel)
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ func initializeClient(t *testing.T) (clientset.Interface, coreinformers.NodeInfo
|
|||||||
t.Errorf("Error during client creation with %v", err)
|
t.Errorf("Error during client creation with %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
stopChannel := make(chan struct{}, 0)
|
stopChannel := make(chan struct{})
|
||||||
|
|
||||||
sharedInformerFactory := informers.NewSharedInformerFactory(clientSet, 0)
|
sharedInformerFactory := informers.NewSharedInformerFactory(clientSet, 0)
|
||||||
sharedInformerFactory.Start(stopChannel)
|
sharedInformerFactory.Start(stopChannel)
|
||||||
|
|||||||
Reference in New Issue
Block a user