Skip to content

Commit

Permalink
run linter
Browse files Browse the repository at this point in the history
Signed-off-by: Jaideep Rao <jaideep.r97@gmail.com>
  • Loading branch information
jaideepr97 committed Jan 4, 2024
1 parent cca6426 commit 883cb50
Show file tree
Hide file tree
Showing 78 changed files with 208 additions and 138 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions controllers/argocd/TOBEREMOVED.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import (
"text/template"
"time"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
configv1 "github.com/openshift/api/config/v1"
templatev1 "github.com/openshift/api/template/v1"
configv1client "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"

routev1 "github.com/openshift/api/route/v1"
"github.com/sethvargo/go-password/password"
"golang.org/x/mod/semver"
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/TOBEREMOVED_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import (
"sort"
"testing"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
Expand All @@ -20,6 +17,10 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"
logf "sigs.k8s.io/controller-runtime/pkg/log"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
)

func setRouteAPIFound(t *testing.T, routeEnabled bool) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/appcontroller/appcontroller.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package appcontroller

import (
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
)

type AppControllerReconciler struct {
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/applicationset/applicationset.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package applicationset

import (
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
)

type ApplicationSetReconciler struct {
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/applicationset/applicationset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package applicationset
import (
"testing"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
routev1 "github.com/openshift/api/route/v1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

var testExpectedLabels = common.DefaultResourceLabels(argocdcommon.TestArgoCDName, argocdcommon.TestNamespace, AppSetControllerComponent)
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/applicationset/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"

appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand Down
5 changes: 3 additions & 2 deletions controllers/argocd/applicationset/role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestApplicationSetReconciler_reconcileRole(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions controllers/argocd/applicationset/rolebinding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestApplicationSetReconciler_reconcileRoleBinding(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/applicationset/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestApplicationSetReconciler_reconcileService(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/applicationset/serviceaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestApplicationSetReconciler_reconcileServiceAccount(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/applicationset/webhookroute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"

routev1 "github.com/openshift/api/route/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
Expand Down
5 changes: 3 additions & 2 deletions controllers/argocd/argocdcommon/testing.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package argocdcommon

import (
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/configmap/configmap.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package configmap

import (
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
)

type ConfigMapReconciler struct {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/hpa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"context"
"testing"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/stretchr/testify/assert"
autoscaling "k8s.io/api/autoscaling/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
logf "sigs.k8s.io/controller-runtime/pkg/log"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import (
"fmt"
"os"

oappsv1client "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
oappsv1client "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1"

appsv1 "github.com/openshift/api/apps/v1"
oappsv1 "github.com/openshift/api/apps/v1"
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/notifications/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/notifications/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"

appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/notifications/notifications.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package notifications

import (
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
)

type NotificationsReconciler struct {
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/notifications/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package notifications
import (
"testing"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

var testExpectedLabels = common.DefaultResourceLabels(argocdcommon.TestArgoCDName, argocdcommon.TestNamespace, common.ArgoCDNotificationsControllerComponent)
Expand Down
5 changes: 3 additions & 2 deletions controllers/argocd/notifications/role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestNotificationsReconciler_reconcileRole(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions controllers/argocd/notifications/rolebinding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestNotificationsReconciler_reconcileRoleBinding(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/notifications/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"

"github.com/argoproj-labs/argocd-operator/common"
"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/notifications/serviceaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"testing"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj-labs/argocd-operator/controllers/argocd/argocdcommon"
)

func TestNotificationsReconciler_reconcileServiceAccount(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/notifications/util.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package notifications

import (
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
corev1 "k8s.io/api/core/v1"

"github.com/argoproj-labs/argocd-operator/pkg/argoutil"
)

// GetDefaultNotificationsConfig returns a map that contains default triggers and template configurations for argocd-notifications-cm
Expand Down
3 changes: 2 additions & 1 deletion controllers/argocd/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"fmt"
"testing"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
)

func TestReconcileWorkloadStatusAlertRule(t *testing.T) {
Expand Down
Loading

0 comments on commit 883cb50

Please sign in to comment.