Skip to content

Commit

Permalink
Merge pull request #19627 from djberg96/default_ems_operation_queue_name
Browse files Browse the repository at this point in the history
Change default queue name for ems operations to generic.
  • Loading branch information
agrare authored Dec 11, 2019
2 parents 4cb4ec8 + bea1b58 commit 56f9343
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,10 @@ def queue_name
end

# Until all providers have an operations worker we can continue
# to use the GenericWorker to run ems_operations roles
# to use the GenericWorker to run ems_operations roles.
#
def queue_name_for_ems_operations
nil
'generic'
end

def enforce_policy(target, event)
Expand Down
10 changes: 10 additions & 0 deletions spec/models/ext_management_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -742,4 +742,14 @@ def deliver_queue_message(queue_message = MiqQueue.order(:id).first)
expect(result[1][4..-1]).to eq([2])
end
end

context "#queue_name_for_ems_operations" do
it "defaults to 'generic' as the queue name for ems operations" do
ems_cloud = FactoryBot.create(:ems_cloud)
ems_container = FactoryBot.create(:ems_container)

expect(ems_cloud.queue_name_for_ems_operations).to eql('generic')
expect(ems_container.queue_name_for_ems_operations).to eql('generic')
end
end
end

0 comments on commit 56f9343

Please sign in to comment.