Skip to content

Commit

Permalink
Remove the default openshift route which is unneeded
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooli Tayer committed Nov 9, 2017
1 parent 772cfa6 commit d857281
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/controllers/ems_container_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class EmsContainerController < ApplicationController
"prometheus" => %w(prometheus prometheus),
"prometheus_alerts" => %w(alerts prometheus)
}.freeze
OPENSHIFT_DEFAULT_ROUTE = %w(hawkular-metrics openshift-infra).freeze

def self.model
ManageIQ::Providers::ContainerManager
Expand Down Expand Up @@ -73,7 +72,7 @@ def update_ems_button_detect(verify_ems = nil)
else
params[:metrics_selection]
end
route, project = OPENSHIFT_ROUTES.fetch(route_type, OPENSHIFT_DEFAULT_ROUTE)
route, project = OPENSHIFT_ROUTES[route_type]
verify_ems ||= find_record_with_rbac(model, params[:id])
set_ems_record_vars(verify_ems, :validate)
@in_a_form = true
Expand Down
8 changes: 4 additions & 4 deletions spec/controllers/ems_container_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
it "detects openshift prometheus alert route" do
require 'kubeclient'
controller.instance_variable_set(:@_params,
:id => openshift_manager.id,
:current_tab => "alerts")
:id => openshift_manager.id,
:current_tab => "alerts")
controller.instance_variable_set(:@_response, ActionDispatch::TestResponse.new)

# set kubeclient to return a mock route.
Expand All @@ -134,9 +134,9 @@

it "tolerates detection exceptions" do
controller.instance_variable_set(:@_params,
:id => openshift_manager.id,
:id => openshift_manager.id,
:current_tab => "metrics",
:metrics_selection => 'hawkular')
:metrics_selection => 'hawkular')
controller.instance_variable_set(:@_response, ActionDispatch::TestResponse.new)

# set kubeclient to return a mock route.
Expand Down

0 comments on commit d857281

Please sign in to comment.