Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default queue name for ems operations to generic. #19627

Merged
merged 1 commit into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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