Skip to content

Commit

Permalink
Fix linter and unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Turken <turkenh@gmail.com>
  • Loading branch information
turkenh committed Dec 7, 2023
1 parent 3ace72a commit 17ceb75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.19.5'
GOLANGCI_VERSION: 'v1.50.1'
GO_VERSION: '1.20.12'
GOLANGCI_VERSION: 'v1.55.2'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider
GO_LDFLAGS += -X $(GO_PROJECT)/pkg/version.Version=$(VERSION)
GO_SUBDIRS += cmd pkg apis
GO111MODULE = on
GOLANGCILINT_VERSION = 1.55.2

-include build/makelib/golang.mk

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/crossplane-contrib/provider-helm

go 1.19
go 1.20

require (
github.com/Azure/kubelogin v0.0.34
Expand Down Expand Up @@ -180,4 +180,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

// This is a workaround until kubelogin project supports being consumed as a go module
// See https://github.com/Azure/kubelogin/pull/371
replace github.com/Azure/kubelogin => github.com/upbound/kubelogin v0.0.34-hotfix.1
5 changes: 2 additions & 3 deletions pkg/clients/helm/kustomize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ package helm

import (
"bytes"
"fmt"
"reflect"
"testing"

"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/resid"
)

Expand Down Expand Up @@ -80,7 +79,7 @@ func TestKustomize(t *testing.T) {
},
want: want{
result: "",
err: errors.WithStack(fmt.Errorf("trouble configuring builtin PatchTransformer with config: `\npatch: '- bad patch'\ntarget:\n kind: Deployment\n`: unable to parse SM or JSON patch from [- bad patch]")),
err: errors.WrapPrefixf(errors.Errorf("unable to parse SM or JSON patch from [- bad patch]"), "trouble configuring builtin PatchTransformer with config: `\npatch: '- bad patch'\ntarget:\n kind: Deployment\n`"),
},
},
}
Expand Down

0 comments on commit 17ceb75

Please sign in to comment.