Skip to content

Commit 2ebafd5

Browse files
authored
feat: update to go 1.24 (#587)
Signed-off-by: Nathanael Liechti <[email protected]>
1 parent 6c2c8ef commit 2ebafd5

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "terraform-provider-argocd",
33
// officiall MS template from https://github.com/devcontainers/templates/tree/main/src/go
4-
"image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
4+
"image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
55
"features": {
66
// https://github.com/devcontainers/features/tree/main/src/docker-in-docker
77
"ghcr.io/devcontainers/features/docker-in-docker:2": {

argocd/resource_argocd_cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func TestAccArgoCDCluster_outsideDeletion(t *testing.T) {
331331
if err != nil {
332332
t.Error(fmt.Errorf("failed to get server interface: %s", err.Error()))
333333
}
334-
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
334+
ctx, cancel := context.WithTimeout(t.Context(), 120*time.Second)
335335
defer cancel()
336336
_, err = si.ClusterClient.Delete(ctx, &cluster.ClusterQuery{Name: clusterName})
337337
if err != nil {

argocd/schema_application_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package argocd
22

33
import (
4-
"context"
54
"reflect"
65
"strings"
76
"testing"
@@ -51,7 +50,7 @@ func TestUpgradeSchemaApplication_V0V1_Default_SkipCrds(t *testing.T) {
5150
},
5251
}
5352

54-
actual, _ := resourceArgoCDApplicationStateUpgradeV0(context.TODO(), v0, nil)
53+
actual, _ := resourceArgoCDApplicationStateUpgradeV0(t.Context(), v0, nil)
5554

5655
if !reflect.DeepEqual(v1, actual) {
5756
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", v1, actual)
@@ -77,7 +76,7 @@ func TestUpgradeSchemaApplication_V0V1_Default_SkipCrds_NoChange(t *testing.T) {
7776
},
7877
}
7978

80-
actual, _ := resourceArgoCDApplicationStateUpgradeV0(context.TODO(), v0, nil)
79+
actual, _ := resourceArgoCDApplicationStateUpgradeV0(t.Context(), v0, nil)
8180

8281
if !reflect.DeepEqual(v0, actual) {
8382
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", v0, actual)
@@ -108,7 +107,7 @@ func TestUpgradeSchemaApplication_V1V2_Default_NoChange(t *testing.T) {
108107
},
109108
}
110109

111-
actual, _ := resourceArgoCDApplicationStateUpgradeV1(context.TODO(), v1, nil)
110+
actual, _ := resourceArgoCDApplicationStateUpgradeV1(t.Context(), v1, nil)
112111

113112
if !reflect.DeepEqual(v1, actual) {
114113
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", v1, actual)
@@ -140,7 +139,7 @@ func TestUpgradeSchemaApplication_V1V2_WithKsonnet(t *testing.T) {
140139
},
141140
}
142141

143-
_, err := resourceArgoCDApplicationStateUpgradeV1(context.TODO(), v1, nil)
142+
_, err := resourceArgoCDApplicationStateUpgradeV1(t.Context(), v1, nil)
144143

145144
if err == nil || !strings.Contains(err.Error(), "'ksonnet' support has been removed") {
146145
t.Fatalf("\n\nexpected error during state migration was not found - err returned was: %v", err)
@@ -177,7 +176,7 @@ func TestUpgradeSchemaApplication_V2V3_Default_NoChange(t *testing.T) {
177176
},
178177
}
179178

180-
actual, _ := resourceArgoCDApplicationStateUpgradeV2(context.TODO(), v2, nil)
179+
actual, _ := resourceArgoCDApplicationStateUpgradeV2(t.Context(), v2, nil)
181180

182181
if !reflect.DeepEqual(v2, actual) {
183182
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", v2, actual)
@@ -550,7 +549,7 @@ func TestUpgradeSchemaApplication_V3V4(t *testing.T) {
550549
t.Run(tc.name, func(t *testing.T) {
551550
t.Parallel()
552551

553-
actualState, err := resourceArgoCDApplicationStateUpgradeV3(context.TODO(), tc.sourceState, nil)
552+
actualState, err := resourceArgoCDApplicationStateUpgradeV3(t.Context(), tc.sourceState, nil)
554553
if err != nil {
555554
t.Fatalf("error migrating state: %s", err)
556555
}

argocd/schema_project_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package argocd
22

33
import (
4-
"context"
54
"reflect"
65
"testing"
76
)
@@ -131,7 +130,7 @@ func TestResourceArgoCDProjectStateUpgradeV0(t *testing.T) {
131130
t.Run(tc.name, func(t *testing.T) {
132131
t.Parallel()
133132

134-
actualState, err := resourceArgoCDProjectStateUpgradeV0(context.TODO(), tc.sourceState, nil)
133+
actualState, err := resourceArgoCDProjectStateUpgradeV0(t.Context(), tc.sourceState, nil)
135134
if err != nil {
136135
t.Fatalf("error migrating state: %s", err)
137136
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/argoproj-labs/terraform-provider-argocd
22

3-
go 1.22.7
3+
go 1.24
44

55
require (
66
github.com/Masterminds/semver/v3 v3.3.1

tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module tools
22

3-
go 1.22.7
3+
go 1.24
44

55
require github.com/hashicorp/terraform-plugin-docs v0.21.0
66

0 commit comments

Comments
 (0)