Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jun 19, 2023
1 parent 76aeb6c commit 1a491c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
8 changes: 4 additions & 4 deletions app/models/manageiq/providers/vmware/infra_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@ def validate_remote_console_webmks_support
true
end

def after_update_authentication
def after_update_authentication(changes)
super
stop_refresh_worker_queue_on_credential_change
stop_refresh_worker_queue_on_credential_change(changes)
end

def after_update_endpoints
def after_update_endpoints(changes)
super
stop_refresh_worker_queue_on_change
stop_refresh_worker_queue_on_change(changes)
end

def self.event_monitor_class
Expand Down
33 changes: 0 additions & 33 deletions spec/models/manageiq/providers/vmware/infra_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,39 +239,6 @@
end
end

context "handling changes that may require EventCatcher restart" do
before(:each) do
zone = EvmSpecHelper.local_miq_server.zone
@ems = FactoryBot.create(:ems_vmware, :zone => zone)
end

it "will restart EventCatcher when ipaddress changes" do
@ems.update(:ipaddress => "1.1.1.1")
assert_event_catcher_restart_queued
end

it "will restart EventCatcher when hostname changes" do
@ems.update(:hostname => "something-else")
assert_event_catcher_restart_queued
end

it "will restart EventCatcher when credentials change" do
@ems.update_authentication(:default => {:userid => "new_user_id"})
assert_event_catcher_restart_queued
end

it "will not put multiple restarts of the EventCatcher on the queue" do
@ems.update(:ipaddress => "1.1.1.1")
@ems.update(:hostname => "something else")
assert_event_catcher_restart_queued
end

it "will not restart EventCatcher when name changes" do
@ems.update(:name => "something else")
expect(MiqQueue.count).to eq(0)
end
end

context "catalog types" do
it "#catalog_types" do
ems = FactoryBot.create(:ems_vmware)
Expand Down

0 comments on commit 1a491c5

Please sign in to comment.