Skip to content

Commit 5172285

Browse files
dhaiducekopenshift-merge-bot[bot]
authored andcommitted
Update to Go v1.24
ref: https://issues.redhat.com/browse/ACM-24264 Signed-off-by: Dale Haiducek <[email protected]>
1 parent b76922e commit 5172285

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Contributors to the Open Cluster Management project
22

33
# Stage 1: Use image builder to build the target binaries
4-
FROM registry.ci.openshift.org/stolostron/builder:go1.23-linux AS builder
4+
FROM registry.ci.openshift.org/stolostron/builder:go1.24-linux AS builder
55

66
ENV COMPONENT=config-policy-controller
77
ENV REPO_PATH=/go/src/github.com/open-cluster-management/${COMPONENT}

controllers/configurationpolicy_controller_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package controllers
55

66
import (
7-
"context"
87
"fmt"
98
"reflect"
109
"sync"
@@ -72,7 +71,7 @@ func TestReconcile(t *testing.T) {
7271
},
7372
}
7473

75-
res, err := r.Reconcile(context.TODO(), req)
74+
res, err := r.Reconcile(t.Context(), req)
7675
if err != nil {
7776
t.Fatalf("reconcile: (%v)", err)
7877
}

controllers/encryption_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package controllers
55

66
import (
7-
"context"
87
"crypto/rand"
98
"testing"
109

@@ -75,7 +74,7 @@ func TestGetEncryptionConfig(t *testing.T) {
7574

7675
policy := getEmptyPolicy()
7776

78-
config, err := r.getEncryptionConfig(context.TODO(), &policy)
77+
config, err := r.getEncryptionConfig(t.Context(), &policy)
7978
Expect(err).ToNot(HaveOccurred())
8079
Expect(config).ToNot(BeNil())
8180
Expect(config.AESKey).ToNot(BeNil())
@@ -100,7 +99,7 @@ func TestGetEncryptionConfigInvalidIV(t *testing.T) {
10099
},
101100
}
102101

103-
_, err := r.getEncryptionConfig(context.TODO(), &policy)
102+
_, err := r.getEncryptionConfig(t.Context(), &policy)
104103
Expect(err.Error()).To(
105104
Equal(
106105
"the policy annotation of \"policy.open-cluster-management.io/encryption-iv\" is not Base64: illegal " +
@@ -117,7 +116,7 @@ func TestGetEncryptionConfigNoSecret(t *testing.T) {
117116

118117
policy := getEmptyPolicy()
119118

120-
_, err := r.getEncryptionConfig(context.TODO(), &policy)
119+
_, err := r.getEncryptionConfig(t.Context(), &policy)
121120
Expect(err.Error()).To(
122121
Equal(
123122
`failed to get the encryption key from Secret local-cluster/policy-encryption-key: secrets ` +

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module open-cluster-management.io/config-policy-controller
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.2.3

0 commit comments

Comments
 (0)