Commit 53586c85 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add pipeline size histogram system test case

parent b3371fa4
......@@ -77,6 +77,18 @@ describe Ci::CreatePipelineService do
pipeline
end
it 'records pipeline size in a prometheus histogram' do
histogram = spy('pipeline size histogram')
allow(Gitlab::Ci::Pipeline::Chain::Metrics)
.to receive(:new).and_return(histogram)
execute_service
expect(histogram).to have_received(:observe)
.with({ source: 'push' }, 5)
end
context 'when merge requests already exist for this source branch' do
let(:merge_request_1) do
create(:merge_request, source_branch: 'feature', target_branch: "master", source_project: project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment