diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 876567e3b7f..a400af284cb 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -1,7 +1,6 @@ cluster/images/etcd/migrate pkg/controller/podautoscaler pkg/controller/replicaset -pkg/controller/resourcequota pkg/volume/azure_dd pkg/volume/testing test/e2e/autoscaling diff --git a/pkg/controller/resourcequota/resource_quota_controller_test.go b/pkg/controller/resourcequota/resource_quota_controller_test.go index 12a79e4a5f4..1697f172817 100644 --- a/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -807,7 +807,7 @@ func TestSyncResourceQuota(t *testing.T) { } } if usage == nil { - t.Errorf("test: %s,\nExpected update action usage, got none: actions:\n%v", testName, actions) + t.Fatalf("test: %s,\nExpected update action usage, got none: actions:\n%v", testName, actions) } // ensure usage is as expected @@ -1138,7 +1138,7 @@ func expectSyncNotBlocked(fakeDiscoveryClient *fakeServerResources, workerLock * workerLockAcquired := make(chan struct{}) go func() { workerLock.Lock() - workerLock.Unlock() + defer workerLock.Unlock() close(workerLockAcquired) }() select {