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

Fix class name for queueing #17717

Merged
merged 1 commit into from
Jul 17, 2018
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
2 changes: 1 addition & 1 deletion app/models/service_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def provision_request(user, options = nil, request_options = nil)

def queue_order(user_id, options, request_options)
MiqQueue.submit_job(
:class_name => name,
:class_name => self.class.name,
:instance_id => id,
:method_name => "order",
:args => [user_id, options, request_options],
Expand Down
13 changes: 13 additions & 0 deletions spec/models/service_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,19 @@
)
end

it "#queue_order" do
EvmSpecHelper.local_miq_server

service_template.queue_order(user.id, {}, {})

expect(MiqQueue.first).to have_attributes(
:args => [user.id, {}, {}],
:class_name => "ServiceTemplate",
:instance_id => service_template.id,
:method_name => "order",
)
end

it "successfully scheduled twice" do
EvmSpecHelper.local_miq_server
expect(resource_action_workflow).to receive(:validate_dialog).twice.and_return([])
Expand Down