Skip to content

Commit

Permalink
fix all unit tests and build errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jaideep Rao <[email protected]>
  • Loading branch information
jaideepr97 committed Jan 3, 2024
1 parent 74235db commit 077fc9f
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 26,328 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COPY main.go main.go
COPY api/ api/
COPY common/ common/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY version/ version/

# Build
Expand Down
11 changes: 0 additions & 11 deletions bundle/manifests/argocd-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1768,17 +1768,6 @@ spec:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy@sha256:db06cc4c084dd0253134f156dddaaf53ef1c3fb3cc809e5d81711baa4029ea4c
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
securityContext:
runAsNonRoot: true
serviceAccountName: argocd-operator-controller-manager
Expand Down
12,833 changes: 0 additions & 12,833 deletions bundle/manifests/argoproj.io_argocds.yaml

Large diffs are not rendered by default.

12,833 changes: 0 additions & 12,833 deletions config/crd/bases/argoproj.io_argocds.yaml

Large diffs are not rendered by default.

642 changes: 0 additions & 642 deletions config/manifests/bases/argocd-operator.clusterserviceversion.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion controllers/argocd/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ func handleKeycloakPodDeletion(dc *oappsv1.DeploymentConfig) error {
func (r *ReconcileArgoCD) reconcileKeycloakConfiguration(cr *argoproj.ArgoCD) error {

// TemplateAPI is available, Install keycloak using openshift templates.
if workloads.IsTemplateAPIAvailable() {
if IsTemplateAPIAvailable() {
err := r.reconcileKeycloakForOpenShift(cr)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions controllers/argocd/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ func (r *ReconcileArgoCD) reconcileRole(name string, policyRules []v1.PolicyRule
}
// only skip creation of dex and redisHa roles for namespaces that no argocd instance is deployed in
if len(list.Items) < 1 {
// only create dexServer and redisHa roles for the namespace where the argocd instance is deployed
if cr.ObjectMeta.Namespace != namespace.Name && (name == common.ArgoCDDexServerComponent || name == common.ArgoCDRedisHAComponent) {
// namespace doesn't contain argocd instance, so skipe all the ArgoCD internal roles
if cr.ObjectMeta.Namespace != namespace.Name && (name != common.ArgoCDApplicationControllerComponent && name != common.ArgoCDServerComponent) {
continue
}
}
Expand Down
8 changes: 2 additions & 6 deletions controllers/argocd/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"

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

oappsv1 "github.com/openshift/api/apps/v1"
configv1 "github.com/openshift/api/config/v1"
Expand Down Expand Up @@ -166,7 +165,7 @@ func TestArgoCDReconciler_reconcileStatusSSO(t *testing.T) {
}
}

func TestArgoCDReconciler_reconcileStatusHost(t *testing.T) {
func TestReconcileArgoCD_reconcileStatusHost(t *testing.T) {
logf.SetLogger(ZapLogger(true))

tests := []struct {
Expand Down Expand Up @@ -198,10 +197,7 @@ func TestArgoCDReconciler_reconcileStatusHost(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {

networking.SetRouteAPIFound(test.testRouteAPIFound)
defer func() {
networking.SetRouteAPIFound(false)
}()
routeAPIFound = test.testRouteAPIFound

a := makeTestArgoCD(func(a *argoproj.ArgoCD) {
a.Spec.Server.Route.Enabled = test.routeEnabled
Expand Down

0 comments on commit 077fc9f

Please sign in to comment.