Skip to content

Commit

Permalink
ServiceTemplateTransformationPlanTask needs a InfraConversionJob
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Mar 5, 2019
1 parent cc58f47 commit 4daf5e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/factories/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
sequence(:name) { |n| "job_#{seq_padded_for_sorting(n)}" }
end

factory :infra_conversion_job, :parent => :job
factory :infra_conversion_job, :class => 'InfraConversionJob', :parent => :job
end
4 changes: 4 additions & 0 deletions spec/factories/miq_request_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@

factory :service_template_transformation_plan_task, :parent => :service_template_provision_task, :class => 'ServiceTemplateTransformationPlanTask' do
request_type { 'transformation_plan' }
after(:build) do |task|
infra_conversion_job = FactoryBot.create(:infra_conversion_job)
task.options[:infra_conversion_job_id] = infra_conversion_job.id
end
end

# Retire Tasks
Expand Down

0 comments on commit 4daf5e0

Please sign in to comment.