Skip to content

Commit

Permalink
Merge pull request #16436 from pkliczewski/master
Browse files Browse the repository at this point in the history
Refresh new target do not run post_refresh
  • Loading branch information
agrare authored Nov 17, 2017
2 parents 9282ecd + 4284854 commit 013c7b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/ems_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def self.refresh_new_target(ems_id, target_hash, target_class, target_find)
end

ems.refresher.refresh(get_target_objects(target))

target.post_create_actions_queue if target.respond_to?(:post_create_actions_queue)
target
end

Expand Down
5 changes: 4 additions & 1 deletion spec/models/ems_refresh_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ def assert_queue_item(expected_targets)
end

context '.refresh_new_target' do
let(:ems) { FactoryGirl.create(:ems_vmware) }
let(:ems) do
_, _, zone = EvmSpecHelper.create_guid_miq_server_zone
FactoryGirl.create(:ems_vmware, :zone => zone)
end

context 'targeting a new vm' do
let(:vm_hash) do
Expand Down

0 comments on commit 013c7b4

Please sign in to comment.