Repository: argoproj-labs/applicationset
Pull request #95 (2021-01-13 09:02:43)

Add 'lint-go' and 'go mod tidy' to GitHub actions

kvendingoldo: Should I fix tidy issues in the same PR?
kvendingoldo: @jgwest @wtam2018  please, review it
wtam2018: /LGTM

Thanks for the patch.

Patch:
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 7f00615..0bb7a4a 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -1,5 +1,5 @@
 name: Integration tests
-on: 
+on:
   push:
     branches:
       - 'master'
@@ -19,6 +19,24 @@ jobs:
         run: |
           DOCKER_PUSH=false make image
 
+  check-go:
+    name: Ensure Go modules synchronicity
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+      - name: Setup Golang
+        uses: actions/setup-go@v1
+        with:
+          go-version: '1.14.12'
+      - name: Download all Go modules
+        run: |
+          go mod download
+      - name: Check for tidyness of go.mod and go.sum
+        run: |
+          go mod tidy
+          git diff --exit-code -- .
+
   build-go:
     name: Build & cache Go code
     runs-on: ubuntu-latest
@@ -40,6 +58,18 @@ jobs:
       - name: Compile all packages
         run: make build
 
+  lint-go:
+    name: Lint Go code
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+      - name: Run golangci-lint
+        uses: golangci/golangci-lint-action@v2
+        with:
+          version: v1.29
+          args: --timeout 5m --exclude SA5011,S1005
+
   test-go:
     name: Run unit tests for Go packages
     runs-on: ubuntu-latest
@@ -104,7 +134,7 @@ jobs:
       matrix:
         k3s-version: [v1.19.2]
         # k3s-version: [v1.19.2, v1.18.9, v1.17.11, v1.16.15]
-    # needs: 
+      # needs:
       # - build-go
     env:
       GOPATH: /home/runner/go
@@ -123,7 +153,7 @@ jobs:
           repository: argoproj/argo-cd
           ref: v1.8.0
           # Pin a specific commit to prevent Argo CD regressions from impacting us
-      - name: Setup Golang  
+      - name: Setup Golang
         uses: actions/setup-go@v1
         with:
           go-version: '1.14.2'
diff --git a/go.mod b/go.mod
index dc48623..05aaaa5 100644
--- a/go.mod
+++ b/go.mod
@@ -3,91 +3,20 @@ module github.com/argoproj-labs/applicationset
 go 1.14
 
 require (
-	github.com/Masterminds/semver v1.5.0
-	github.com/TomOnTime/utfutil v0.0.0-20180511104225-09c41003ee1d
-	github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 // indirect
-	github.com/alicebob/miniredis v2.5.0+incompatible
 	github.com/argoproj/argo-cd v1.8.1
 	github.com/argoproj/gitops-engine v0.2.1
 	github.com/argoproj/pkg v0.2.0
-	github.com/bombsimon/logrusr v1.0.0
-	github.com/casbin/casbin v1.9.1
-	github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1 // indirect
-	github.com/coreos/go-oidc v2.1.0+incompatible
-	github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1
-	github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
-	github.com/dustin/go-humanize v1.0.0
-	github.com/evanphx/json-patch v4.9.0+incompatible
-	github.com/fsnotify/fsnotify v1.4.9
-	github.com/ghodss/yaml v1.0.0
-	github.com/go-logr/logr v0.3.0
-	github.com/go-openapi/loads v0.19.4
-	github.com/go-openapi/runtime v0.19.4
-	github.com/go-openapi/spec v0.19.3
-	github.com/go-redis/cache/v8 v8.2.1
-	github.com/go-redis/redis/v8 v8.3.2
-	github.com/gobuffalo/packr v1.11.0
-	github.com/gobwas/glob v0.2.3
-	github.com/gogits/go-gogs-client v0.0.0-20190616193657-5a05380e4bc2
-	github.com/gogo/protobuf v1.3.1
-	github.com/golang/protobuf v1.4.3
-	github.com/gomodule/redigo v2.0.0+incompatible // indirect
-	github.com/google/go-cmp v0.5.2
-	github.com/google/go-jsonnet v0.17.0
-	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
-	github.com/google/uuid v1.1.1
-	github.com/gorilla/handlers v1.5.1
-	github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
-	github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
-	github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
-	github.com/grpc-ecosystem/grpc-gateway v1.14.6
-	github.com/improbable-eng/grpc-web v0.0.0-20181111100011-16092bd1d58a
 	github.com/jeremywohl/flatten v1.0.1
-	github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
-	github.com/malexdev/utfutil v0.0.0-20180510171754-00c8d4a8e7a8 // indirect
-	github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf // indirect
-	github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
-	github.com/patrickmn/go-cache v2.1.0+incompatible
 	github.com/pkg/errors v0.9.1
-	github.com/pquerna/cachecontrol v0.0.0-20180306154005-525d0eb5f91d // indirect
-	github.com/prometheus/client_golang v1.7.1
-	github.com/robfig/cron v1.1.0
-	github.com/rs/cors v1.6.0 // indirect
 	github.com/sirupsen/logrus v1.6.0
-	github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
-	github.com/soheilhy/cmux v0.1.4
-	github.com/spf13/cobra v1.0.0
-	github.com/spf13/pflag v1.0.5
 	github.com/stretchr/testify v1.6.1
-	github.com/undefinedlabs/go-mpatch v1.0.6
 	github.com/valyala/fasttemplate v1.2.1
-	github.com/vmihailenco/msgpack/v5 v5.1.0 // indirect
-	github.com/yuin/gopher-lua v0.0.0-20190115140932-732aa6820ec4
-	golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
-	golang.org/x/exp v0.0.0-20200821190819-94841d0725da // indirect
-	golang.org/x/net v0.0.0-20201024042810-be3efd7ff127
-	golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
-	golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
-	google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
 	google.golang.org/grpc v1.29.1
-	gopkg.in/go-playground/webhooks.v5 v5.11.0
-	gopkg.in/src-d/go-git.v4 v4.13.1
-	gopkg.in/yaml.v2 v2.3.0
 	k8s.io/api v0.19.2
-	k8s.io/apiextensions-apiserver v0.19.2
 	k8s.io/apimachinery v0.19.2
 	k8s.io/client-go v11.0.1-0.20190816222228-6d55c1b1f1ca+incompatible
-	k8s.io/code-generator v0.19.2
-	k8s.io/component-base v0.19.2
-	k8s.io/klog v1.0.0
-	k8s.io/klog/v2 v2.3.0 // indirect
-	k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
-	k8s.io/kubectl v0.19.2
 	k8s.io/kubernetes v1.19.2
-	k8s.io/utils v0.0.0-20200912215256-4140de9c8800
-	layeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427
 	sigs.k8s.io/controller-runtime v0.7.0
-	sigs.k8s.io/yaml v1.2.0
 )
 
 replace (
diff --git a/go.sum b/go.sum
index 57e4fd8..c35e6a2 100644
--- a/go.sum
+++ b/go.sum
@@ -40,6 +40,7 @@ github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1Gn
 github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
 github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
 github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ=
@@ -172,8 +173,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 h1:CaO/zOnF8VvUfEbhRatPcwKVWamvbYd8tQGRWacE9kU=
-github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
 github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
@@ -371,8 +370,6 @@ github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEo
 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
 github.com/gorilla/handlers v1.5.0/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
-github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
-github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
 github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
 github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
@@ -712,10 +709,12 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
 go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
 go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
 go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
 go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
 go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
 go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
 go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
@@ -759,6 +758,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
 golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE=
 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
 golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
 golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1015,6 +1015,7 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms=
 k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI=
diff --git a/pkg/controllers/clustereventhandler.go b/pkg/controllers/clustereventhandler.go
index b6c9c28..c657444 100644
--- a/pkg/controllers/clustereventhandler.go
+++ b/pkg/controllers/clustereventhandler.go
@@ -2,6 +2,7 @@ package controllers
 
 import (
 	"context"
+
 	log "github.com/sirupsen/logrus"
 
 	"k8s.io/apimachinery/pkg/types"


Test patch:
diff --git a/pkg/controllers/applicationset_controller_test.go b/pkg/controllers/applicationset_controller_test.go
index 242daf2..c2e1ad1 100644
--- a/pkg/controllers/applicationset_controller_test.go
+++ b/pkg/controllers/applicationset_controller_test.go
@@ -16,6 +16,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/client-go/tools/record"
+	"sigs.k8s.io/controller-runtime/pkg/client"
 	crtclient "sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
@@ -62,7 +63,7 @@ func TestExtractApplications(t *testing.T) {
 	err = argov1alpha1.AddToScheme(scheme)
 	assert.Nil(t, err)
 
-	client := fake.NewFakeClientWithScheme(scheme)
+	client := fake.NewClientBuilder().WithScheme(scheme).Build()
 
 	for _, c := range []struct {
 		name                string
@@ -236,7 +237,7 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
 				},
 			},
 			existsApps: []argov1alpha1.Application{
-				argov1alpha1.Application{
+				{
 					TypeMeta: metav1.TypeMeta{
 						Kind:       "Application",
 						APIVersion: "argoproj.io/v1alpha1",
@@ -293,7 +294,7 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
 				},
 			},
 			existsApps: []argov1alpha1.Application{
-				argov1alpha1.Application{
+				{
 					TypeMeta: metav1.TypeMeta{
 						Kind:       "Application",
 						APIVersion: "argoproj.io/v1alpha1",
@@ -336,14 +337,14 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
 			},
 		},
 	} {
-		initObjs := []runtime.Object{&c.appSet}
+		initObjs := []client.Object{&c.appSet}
 		for _, a := range c.existsApps {
 			err = controllerutil.SetControllerReference(&c.appSet, &a, scheme)
 			assert.Nil(t, err)
 			initObjs = append(initObjs, &a)
 		}
 
-		client := fake.NewFakeClientWithScheme(scheme, initObjs...)
+		client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(initObjs...).Build()
 
 		r := ApplicationSetReconciler{
 			Client:   client,
@@ -429,7 +430,7 @@ func TestCreateApplications(t *testing.T) {
 				},
 			},
 			existsApps: []argov1alpha1.Application{
-				argov1alpha1.Application{
+				{
 					TypeMeta: metav1.TypeMeta{
 						Kind:       "Application",
 						APIVersion: "argoproj.io/v1alpha1",
@@ -486,7 +487,7 @@ func TestCreateApplications(t *testing.T) {
 				},
 			},
 			existsApps: []argov1alpha1.Application{
-				argov1alpha1.Application{
+				{
 					TypeMeta: metav1.TypeMeta{
 						Kind:       "Application",
 						APIVersion: "argoproj.io/v1alpha1",
@@ -529,14 +530,14 @@ func TestCreateApplications(t *testing.T) {
 			},
 		},
 	} {
-		initObjs := []runtime.Object{&c.appSet}
+		initObjs := []client.Object{&c.appSet}
 		for _, a := range c.existsApps {
 			err = controllerutil.SetControllerReference(&c.appSet, &a, scheme)
 			assert.Nil(t, err)
 			initObjs = append(initObjs, &a)
 		}
 
-		client := fake.NewFakeClientWithScheme(scheme, initObjs...)
+		client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(initObjs...).Build()
 
 		r := ApplicationSetReconciler{
 			Client:   client,
@@ -666,7 +667,7 @@ func TestDeleteInCluster(t *testing.T) {
 			},
 		},
 	} {
-		initObjs := []runtime.Object{&c.appSet}
+		initObjs := []client.Object{&c.appSet}
 		for _, a := range c.existsApps {
 			temp := a
 			err = controllerutil.SetControllerReference(&c.appSet, &temp, scheme)
@@ -674,7 +675,7 @@ func TestDeleteInCluster(t *testing.T) {
 			initObjs = append(initObjs, &temp)
 		}
 
-		client := fake.NewFakeClientWithScheme(scheme, initObjs...)
+		client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(initObjs...).Build()
 
 		r := ApplicationSetReconciler{
 			Client:   client,
@@ -717,7 +718,7 @@ func TestGetMinRequeueAfter(t *testing.T) {
 	err = argov1alpha1.AddToScheme(scheme)
 	assert.Nil(t, err)
 
-	client := fake.NewFakeClientWithScheme(scheme)
+	client := fake.NewClientBuilder().WithScheme(scheme).Build()
 
 	generator := argoprojiov1alpha1.ApplicationSetGenerator{
 		List:     &argoprojiov1alpha1.ListGenerator{},
diff --git a/pkg/generators/cluster_test.go b/pkg/generators/cluster_test.go
index 284e4b1..8bda14f 100644
--- a/pkg/generators/cluster_test.go
+++ b/pkg/generators/cluster_test.go
@@ -7,7 +7,6 @@ import (
 
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/client-go/kubernetes/scheme"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/client/fake"
@@ -32,7 +31,7 @@ func (p *possiblyErroringFakeCtrlRuntimeClient) List(ctx context.Context, secret
 }
 
 func TestGenerateParams(t *testing.T) {
-	clusters := []runtime.Object{
+	clusters := []client.Object{
 		&corev1.Secret{
 			TypeMeta: metav1.TypeMeta{
 				Kind:       "Secret",
@@ -160,7 +159,7 @@ func TestGenerateParams(t *testing.T) {
 	}
 
 	for _, testCase := range testCases {
-		fakeClient := fake.NewFakeClientWithScheme(scheme.Scheme, clusters...)
+		fakeClient := fake.NewClientBuilder().WithScheme(scheme.Scheme).WithObjects(clusters...).Build()
 		cl := &possiblyErroringFakeCtrlRuntimeClient{
 			fakeClient,
 			testCase.clientError,
diff --git a/pkg/generators/git_test.go b/pkg/generators/git_test.go
index f817c17..5bb3060 100644
--- a/pkg/generators/git_test.go
+++ b/pkg/generators/git_test.go
@@ -151,7 +151,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
 	}{
 		{
 			name:  "happy flow: create params from git files",
-			files: []argoprojiov1alpha1.GitFileGeneratorItem{{"**/config.json"}},
+			files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
 			repoPaths: []string{
 				"cluster-config/production/config.json",
 				"cluster-config/staging/config.json",
@@ -200,7 +200,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
 		},
 		{
 			name:                   "handles error during getting repo paths",
-			files:                  []argoprojiov1alpha1.GitFileGeneratorItem{{"**/config.json"}},
+			files:                  []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
 			repoPaths:              []string{},
 			repoFileContents:       map[string][]byte{},
 			repoPathsError:         fmt.Errorf("paths error"),
@@ -210,7 +210,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
 		},
 		{
 			name:  "handles error during getting repo file contents",
-			files: []argoprojiov1alpha1.GitFileGeneratorItem{{"**/config.json"}},
+			files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
 			repoPaths: []string{
 				"cluster-config/production/config.json",
 				"cluster-config/staging/config.json",
diff --git a/test/e2e/fixture/applicationsets/expectation.go b/test/e2e/fixture/applicationsets/expectation.go
index 9b1cdea..1427bf4 100644
--- a/test/e2e/fixture/applicationsets/expectation.go
+++ b/test/e2e/fixture/applicationsets/expectation.go
@@ -133,11 +133,3 @@ func filterFields(input argov1alpha1.Application) argov1alpha1.Application {
 func appsAreEqual(one argov1alpha1.Application, two argov1alpha1.Application) bool {
 	return reflect.DeepEqual(filterFields(one), filterFields(two))
 }
-
-func simple(success bool, message string) (state, string) {
-	if success {
-		return succeeded, message
-	}
-
-	return pending, message
-}
diff --git a/test/e2e/fixture/applicationsets/utils/fixture.go b/test/e2e/fixture/applicationsets/utils/fixture.go
index 614f432..91f9913 100644
--- a/test/e2e/fixture/applicationsets/utils/fixture.go
+++ b/test/e2e/fixture/applicationsets/utils/fixture.go
@@ -24,7 +24,6 @@ import (
 )
 
 const (
-	adminPassword   = "password"
 	ArgoCDNamespace = "argocd-e2e"
 	TmpDir          = "/tmp/applicationset-e2e"
 	TestingLabel    = "e2e.argoproj.io"
@@ -32,14 +31,10 @@ const (
 
 var (
 	id               string
-	name             string
 	KubeClientset    kubernetes.Interface
 	DynamicClientset dynamic.Interface
 	AppClientset     appclientset.Interface
 	AppSetClientset  dynamic.ResourceInterface
-
-	token     string
-	plainText bool
 )
 
 func EnsureCleanState(t *testing.T) {