Skip to content

Commit

Permalink
Bump golangci-lint to v1.47.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jul 19, 2022
1 parent e29d7fb commit 8a524c8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Expand Up @@ -25,5 +25,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
with:
version: v1.44.0
version: v1.47.1
working-directory: ${{matrix.working-directory}}
6 changes: 3 additions & 3 deletions controllers/remote/cluster_cache_reconciler_test.go
Expand Up @@ -45,7 +45,7 @@ func TestClusterCacheReconciler(t *testing.T) {

// createAndWatchCluster creates a new cluster and ensures the clusterCacheTracker has a clusterAccessor for it
createAndWatchCluster := func(clusterName string, testNamespace *corev1.Namespace, g *WithT) {
t.Log(fmt.Sprintf("Creating a cluster %q", clusterName))
t.Logf("Creating a cluster %q", clusterName)
testCluster := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: clusterName,
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestClusterCacheReconciler(t *testing.T) {
defer teardown(t, g, testNamespace)

for _, clusterName := range []string{"cluster-1", "cluster-2", "cluster-3"} {
t.Log(fmt.Sprintf("Deleting cluster %q", clusterName))
t.Logf("Deleting cluster %q", clusterName)
obj := &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Namespace: testNamespace.Name,
Expand All @@ -145,7 +145,7 @@ func TestClusterCacheReconciler(t *testing.T) {
}
g.Expect(k8sClient.Delete(ctx, obj)).To(Succeed())

t.Log(fmt.Sprintf("Checking cluster %q's clusterAccessor is removed", clusterName))
t.Logf("Checking cluster %q's clusterAccessor is removed", clusterName)
g.Eventually(func() bool { return cct.clusterAccessorExists(util.ObjectKey(obj)) }, timeout).Should(BeFalse())
}
})
Expand Down
7 changes: 2 additions & 5 deletions internal/webhooks/cluster_test.go
Expand Up @@ -47,9 +47,7 @@ func TestClusterDefaultNamespaces(t *testing.T) {
},
}
webhook := &Cluster{}
tFunc := util.CustomDefaultValidateTest(ctx, c, webhook)

t.Run("for Cluster", tFunc)
t.Run("for Cluster", util.CustomDefaultValidateTest(ctx, c, webhook))
g.Expect(webhook.Default(ctx, c)).To(Succeed())

g.Expect(c.Spec.InfrastructureRef.Namespace).To(Equal(c.Namespace))
Expand Down Expand Up @@ -351,8 +349,7 @@ func TestClusterDefaultTopologyVersion(t *testing.T) {

// Create the webhook and add the fakeClient as its client.
webhook := &Cluster{Client: fakeClient}
tFunc := util.CustomDefaultValidateTest(ctx, c, webhook)
t.Run("for Cluster", tFunc)
t.Run("for Cluster", util.CustomDefaultValidateTest(ctx, c, webhook))
g.Expect(webhook.Default(ctx, c)).To(Succeed())

g.Expect(c.Spec.Topology.Version).To(HavePrefix("v"))
Expand Down
4 changes: 1 addition & 3 deletions internal/webhooks/clusterclass_test.go
Expand Up @@ -77,9 +77,7 @@ func TestClusterClassDefaultNamespaces(t *testing.T) {

// Create the webhook and add the fakeClient as its client.
webhook := &ClusterClass{Client: fakeClient}
tFunc := util.CustomDefaultValidateTest(ctx, in, webhook)

t.Run("for ClusterClass", tFunc)
t.Run("for ClusterClass", util.CustomDefaultValidateTest(ctx, in, webhook))

g := NewWithT(t)
g.Expect(webhook.Default(ctx, in)).To(Succeed())
Expand Down
2 changes: 0 additions & 2 deletions util/container/image.go
Expand Up @@ -18,10 +18,8 @@ limitations under the License.
package container

import (

// Import the crypto sha256 algorithm for the docker image parser to work
_ "crypto/sha256"

// Import the crypto/sha512 algorithm for the docker image parser to work with 384 and 512 sha hashes
_ "crypto/sha512"
"fmt"
Expand Down

0 comments on commit 8a524c8

Please sign in to comment.