Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Feb 15, 2021
1 parent 7165804 commit 46d7957
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/che/che_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func (r *ReconcileChe) Reconcile(request reconcile.Request) (reconcile.Result, e
}

if instance.Spec.Auth.InitialOpenShiftOAuthUser == nil && instance.Status.OpenShiftOAuthUserCredentialsSecret != "" {
secret, err := deploy.GetSecret(deployContext, instance.Status.OpenShiftOAuthUserCredentialsSecret, instance.Namespace)
secret, err := deploy.GetSecret(deployContext, openShiftOAuthUserCredentialsSecret, instance.Namespace)
if secret == nil {
if err == nil {
instance.Status.OpenShiftOAuthUserCredentialsSecret = ""
Expand Down
7 changes: 3 additions & 4 deletions pkg/deploy/ingres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/google/go-cmp/cmp"

orgv1 "github.com/eclipse/che-operator/pkg/apis/org/v1"
"github.com/eclipse/che-operator/pkg/util"
"k8s.io/api/extensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -31,8 +32,6 @@ import (
)

func TestIngressSpec(t *testing.T) {
_true := true

type testCase struct {
name string
ingressName string
Expand Down Expand Up @@ -72,8 +71,8 @@ func TestIngressSpec(t *testing.T) {
{
APIVersion: "org.eclipse.che/v1",
Kind: "CheCluster",
Controller: &_true,
BlockOwnerDeletion: &_true,
Controller: util.NewBoolPointer(true),
BlockOwnerDeletion: util.NewBoolPointer(true),
},
},
Annotations: map[string]string{
Expand Down
10 changes: 5 additions & 5 deletions pkg/deploy/route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
routev1 "github.com/openshift/api/route/v1"

orgv1 "github.com/eclipse/che-operator/pkg/apis/org/v1"
"github.com/eclipse/che-operator/pkg/util"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
Expand All @@ -32,7 +33,6 @@ import (

func TestRouteSpec(t *testing.T) {
weight := int32(100)
_true := true

type testCase struct {
name string
Expand Down Expand Up @@ -73,8 +73,8 @@ func TestRouteSpec(t *testing.T) {
{
APIVersion: "org.eclipse.che/v1",
Kind: "CheCluster",
Controller: &_true,
BlockOwnerDeletion: &_true,
Controller: util.NewBoolPointer(true),
BlockOwnerDeletion: util.NewBoolPointer(true),
},
},
},
Expand Down Expand Up @@ -124,8 +124,8 @@ func TestRouteSpec(t *testing.T) {
{
APIVersion: "org.eclipse.che/v1",
Kind: "CheCluster",
Controller: &_true,
BlockOwnerDeletion: &_true,
Controller: util.NewBoolPointer(true),
BlockOwnerDeletion: util.NewBoolPointer(true),
},
},
},
Expand Down

0 comments on commit 46d7957

Please sign in to comment.