Fix staticcheck failures for scheduler packages
Errors from staticcheck: cmd/kube-scheduler/app/server.go:297:27: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead. (SA1019) pkg/apis/scheduling/v1alpha1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000) pkg/apis/scheduling/v1beta1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000) test/e2e/scheduling/predicates.go:757:6: func verifyReplicasResult is unused (U1000) test/e2e/scheduling/predicates.go:765:6: func getPodsByLabels is unused (U1000) test/e2e/scheduling/predicates.go:772:6: func runAndKeepPodWithLabelAndGetNodeName is unused (U1000) test/e2e/scheduling/limit_range.go:172:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:177:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:196:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:201:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:240:3: this value of pod is never used (SA4006) test/e2e/scheduling/taints.go:428:13: this value of err is never used (SA4006) test/e2e/scheduling/ubernetes_lite.go:219:2: this value of pods is never used (SA4006) test/integration/scheduler/extender_test.go:78:4: this value of resp is never used (SA4006) test/integration/volumescheduling/volume_binding_test.go:529:15: this result of append is never used, except maybe in other appends (SA4010) test/integration/volumescheduling/volume_binding_test.go:538:15: this result of append is never used, except maybe in other appends (SA4010)
This commit is contained in:
@@ -511,7 +511,6 @@ func testVolumeBindingWithAffinity(t *testing.T, anti bool, numNodes, numPods, n
|
||||
|
||||
pods := []*v1.Pod{}
|
||||
pvcs := []*v1.PersistentVolumeClaim{}
|
||||
pvs := []*v1.PersistentVolume{}
|
||||
|
||||
// Create PVs for the first node
|
||||
for i := 0; i < numPVsFirstNode; i++ {
|
||||
@@ -519,7 +518,6 @@ func testVolumeBindingWithAffinity(t *testing.T, anti bool, numNodes, numPods, n
|
||||
if pv, err := config.client.CoreV1().PersistentVolumes().Create(pv); err != nil {
|
||||
t.Fatalf("Failed to create PersistentVolume %q: %v", pv.Name, err)
|
||||
}
|
||||
pvs = append(pvs, pv)
|
||||
}
|
||||
|
||||
// Create 1 PV per Node for the remaining nodes
|
||||
@@ -528,7 +526,6 @@ func testVolumeBindingWithAffinity(t *testing.T, anti bool, numNodes, numPods, n
|
||||
if pv, err := config.client.CoreV1().PersistentVolumes().Create(pv); err != nil {
|
||||
t.Fatalf("Failed to create PersistentVolume %q: %v", pv.Name, err)
|
||||
}
|
||||
pvs = append(pvs, pv)
|
||||
}
|
||||
|
||||
// Create pods
|
||||
|
Reference in New Issue
Block a user