diff --git a/pkg/controller/devopsproject/devopsproject_controller.go b/pkg/controller/devopsproject/devopsproject_controller.go index 8db408ffc..0ced43c6b 100644 --- a/pkg/controller/devopsproject/devopsproject_controller.go +++ b/pkg/controller/devopsproject/devopsproject_controller.go @@ -25,7 +25,7 @@ import ( ) /** - DevOps project controller is used to maintain the state of the DevOps project. +DevOps project controller is used to maintain the state of the DevOps project. */ type Controller struct { diff --git a/pkg/controller/devopsproject/devopsproject_controller_test.go b/pkg/controller/devopsproject/devopsproject_controller_test.go index 0c4da815f..bcfcc6973 100644 --- a/pkg/controller/devopsproject/devopsproject_controller_test.go +++ b/pkg/controller/devopsproject/devopsproject_controller_test.go @@ -182,10 +182,8 @@ func filterInformerActions(actions []core.Action) []core.Action { ret := []core.Action{} for _, action := range actions { if len(action.GetNamespace()) == 0 && - (action.Matches("list", "foos") || - action.Matches("watch", "foos") || - action.Matches("list", "deployments") || - action.Matches("watch", "deployments")) { + (action.Matches("list", devopsprojects.ResourcePluralDevOpsProject) || + action.Matches("watch", devopsprojects.ResourcePluralDevOpsProject)) { continue } ret = append(ret, action) diff --git a/pkg/controller/s2ibinary/s2ibinary_controller_test.go b/pkg/controller/s2ibinary/s2ibinary_controller_test.go index 49be1f59e..44aecf4d6 100644 --- a/pkg/controller/s2ibinary/s2ibinary_controller_test.go +++ b/pkg/controller/s2ibinary/s2ibinary_controller_test.go @@ -184,10 +184,8 @@ func filterInformerActions(actions []core.Action) []core.Action { ret := []core.Action{} for _, action := range actions { if len(action.GetNamespace()) == 0 && - (action.Matches("list", "foos") || - action.Matches("watch", "foos") || - action.Matches("list", "deployments") || - action.Matches("watch", "deployments")) { + (action.Matches("list", s2i.ResourcePluralS2iBinary) || + action.Matches("watch", s2i.ResourcePluralS2iBinary)) { continue } ret = append(ret, action) diff --git a/pkg/controller/s2irun/s2irun_controller.go b/pkg/controller/s2irun/s2irun_controller.go index 34327f634..d86548781 100644 --- a/pkg/controller/s2irun/s2irun_controller.go +++ b/pkg/controller/s2irun/s2irun_controller.go @@ -25,8 +25,8 @@ import ( ) /** - s2irun-controller used to handle s2irun's delete logic. - s2irun creation and operation provided by s2ioperator +s2irun-controller used to handle s2irun's delete logic. +s2irun creation and operation provided by s2ioperator */ type Controller struct { client clientset.Interface diff --git a/pkg/controller/s2irun/s2irun_controller_test.go b/pkg/controller/s2irun/s2irun_controller_test.go index ee978d592..31f504afb 100644 --- a/pkg/controller/s2irun/s2irun_controller_test.go +++ b/pkg/controller/s2irun/s2irun_controller_test.go @@ -226,10 +226,10 @@ func filterInformerActions(actions []core.Action) []core.Action { ret := []core.Action{} for _, action := range actions { if len(action.GetNamespace()) == 0 && - (action.Matches("list", "foos") || - action.Matches("watch", "foos") || - action.Matches("list", "deployments") || - action.Matches("watch", "deployments")) { + (action.Matches("list", s2i.ResourcePluralS2iRun) || + action.Matches("watch", s2i.ResourcePluralS2iRun) || + action.Matches("list", s2i.ResourcePluralS2iBinary) || + action.Matches("watch", s2i.ResourcePluralS2iBinary)) { continue } ret = append(ret, action)