Skip to content

Commit

Permalink
Remove deprecated validate_creds_task
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Feb 8, 2020
1 parent 6e87da7 commit a156e61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/mixins/ems_common/angular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create_ems_button_validate
@in_a_form = true
ems_type = model.model_from_emstype(params[:emstype])
result, details = if %w[ems_cloud ems_infra].include?(params[:controller])
ems_type.validate_credentials_task(get_task_args(ems_type), session[:userid], params[:zone])
ems_type.verify_credentials_task(get_task_args(ems_type), session[:userid], params[:zone])
else
realtime_authentication_check(ems_type.new)
end
Expand Down
12 changes: 6 additions & 6 deletions spec/controllers/ems_cloud_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
end

it "validates credentials for a new record" do
expect(ManageIQ::Providers::Amazon::CloudManager).to receive(:validate_credentials_task).with(
expect(ManageIQ::Providers::Amazon::CloudManager).to receive(:verify_credentials_task).with(
match_array([
'foo',
'v2:{SRpWIJC0Y1AOrUrKC0KDiw==}',
Expand Down Expand Up @@ -322,15 +322,15 @@
let(:mocked_params) { {:controller => mocked_class_controller, :cred_type => "default", :default_url => ""} }

it "queues the authentication type if it is a cloud provider" do
expect(mocked_class).to receive(:validate_credentials_task)
expect(mocked_class).to receive(:verify_credentials_task)
controller.send(:create_ems_button_validate)
end

it "does queue the authentication check even if it is a cloud provider with a ui role" do
session[:selected_roles] = ['user_interface']

expect(mocked_class).not_to receive(:raw_connect)
expect(mocked_class).to receive(:validate_credentials_task)
expect(mocked_class).to receive(:verify_credentials_task)
controller.send(:create_ems_button_validate)
end

Expand All @@ -343,7 +343,7 @@

it "queues the correct number of arguments" do
expected_validate_args = [project, ManageIQ::Password.encrypt(service_account), compute_service, nil, true]
expect(mocked_class).to receive(:validate_credentials_task).with(expected_validate_args, nil, nil)
expect(mocked_class).to receive(:verify_credentials_task).with(expected_validate_args, nil, nil)
controller.send(:create_ems_button_validate)
end
end
Expand All @@ -354,7 +354,7 @@
let(:mocked_class_controller) { "ems_infra" }

it "queues the authentication check" do
expect(mocked_class).to receive(:validate_credentials_task)
expect(mocked_class).to receive(:verify_credentials_task)
controller.send(:create_ems_button_validate)
end

Expand All @@ -364,7 +364,7 @@

it "disables the broker" do
expected_validate_args = [{:pass => nil, :user => nil, :ip => nil, :use_broker => false}]
expect(mocked_class).to receive(:validate_credentials_task).with(expected_validate_args, nil, nil)
expect(mocked_class).to receive(:verify_credentials_task).with(expected_validate_args, nil, nil)
controller.send(:create_ems_button_validate)
end
end
Expand Down

0 comments on commit a156e61

Please sign in to comment.