From fdaad0d20b41789fc988558a7a43a0cbc01ac996 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 13:34:22 +0000 Subject: [PATCH 1/2] chore(deps): update dependency golangci/golangci-lint to v2.12.2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f019a8..971ef88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: uses: golangci/golangci-lint-action@v9 with: # renovate: datasource=go depName=github.com/golangci/golangci-lint - version: 'v2.11.4' + version: 'v2.12.2' unit-test: runs-on: ubuntu-24.04 From 7991ac47fd6565f739d8f0126aba53022f89efb1 Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Mon, 11 May 2026 09:52:09 +0200 Subject: [PATCH 2/2] const --- fn_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fn_test.go b/fn_test.go index 5d8e2cf..dbab591 100644 --- a/fn_test.go +++ b/fn_test.go @@ -26,6 +26,8 @@ func TestRunFunction(t *testing.T) { err error } + const tagHello = "hello" + cases := map[string]struct { reason string args args @@ -35,7 +37,7 @@ func TestRunFunction(t *testing.T) { reason: "The Function requires more external resources", args: args{ req: &fnv1.RunFunctionRequest{ - Meta: &fnv1.RequestMeta{Tag: "hello"}, + Meta: &fnv1.RequestMeta{Tag: tagHello}, Input: resource.MustStructJSON(`{ "apiVersion": "s3-user-arn.fn.crossplane.io/v1alpha1", "kind": "Input" @@ -74,7 +76,7 @@ func TestRunFunction(t *testing.T) { }, want: want{ rsp: &fnv1.RunFunctionResponse{ - Meta: &fnv1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)}, + Meta: &fnv1.ResponseMeta{Tag: tagHello, Ttl: durationpb.New(response.DefaultTTL)}, Context: resource.MustStructJSON(`{ "apiextensions.crossplane.io/environment": { "tenantName": "tenant" @@ -104,7 +106,7 @@ func TestRunFunction(t *testing.T) { reason: "The Function should return a successful result if sufficient resources are provided", args: args{ req: &fnv1.RunFunctionRequest{ - Meta: &fnv1.RequestMeta{Tag: "hello"}, + Meta: &fnv1.RequestMeta{Tag: tagHello}, Input: resource.MustStructJSON(`{ "apiVersion": "s3-user-arn.fn.crossplane.io/v1alpha1", "kind": "Input" @@ -163,7 +165,7 @@ func TestRunFunction(t *testing.T) { }, want: want{ rsp: &fnv1.RunFunctionResponse{ - Meta: &fnv1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)}, + Meta: &fnv1.ResponseMeta{Tag: tagHello, Ttl: durationpb.New(response.DefaultTTL)}, Context: resource.MustStructJSON(`{ "apiextensions.crossplane.io/environment": { "tenantName": "tenant" @@ -209,7 +211,7 @@ func TestRunFunction(t *testing.T) { reason: "The Function should return a successful result if sufficient resources are provided", args: args{ req: &fnv1.RunFunctionRequest{ - Meta: &fnv1.RequestMeta{Tag: "hello"}, + Meta: &fnv1.RequestMeta{Tag: tagHello}, Input: resource.MustStructJSON(`{ "apiVersion": "s3-user-arn.fn.crossplane.io/v1alpha1", "kind": "Input" @@ -270,7 +272,7 @@ func TestRunFunction(t *testing.T) { }, want: want{ rsp: &fnv1.RunFunctionResponse{ - Meta: &fnv1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)}, + Meta: &fnv1.ResponseMeta{Tag: tagHello, Ttl: durationpb.New(response.DefaultTTL)}, Context: resource.MustStructJSON(`{ "apiextensions.crossplane.io/environment": { "tenantName": "tenant"