Skip to content

Commit

Permalink
testing initialization on MiqQueue#miq_task_id
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Apr 18, 2018
1 parent f3e60d0 commit 374a2e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/models/metric/ci_mixin/capture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ def verify_perf_capture_queue(last_perf_capture_on, total_queue_items)
verify_perf_capture_queue(last_perf_capture_on, 11)
end
end

it "links supplied miq_task with queued item which allow to initialize MiqTask#started_on attribute" do
MiqQueue.delete_all
task = FactoryGirl.create(:miq_task)
vm.perf_capture_queue("realtime", :task_id => task.id)
expect(MiqQueue.first.miq_task_id).to eq task.id
end
end

describe "#perf_capture_queue('historical')" do
Expand Down

0 comments on commit 374a2e5

Please sign in to comment.