Commit ff1bc177 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Add test for prom metric gathering

parent 4fa71584
...@@ -38,6 +38,14 @@ describe Ci::CreatePipelineService, :services do ...@@ -38,6 +38,14 @@ describe Ci::CreatePipelineService, :services do
expect(pipeline.builds.first).to be_kind_of(Ci::Build) expect(pipeline.builds.first).to be_kind_of(Ci::Build)
end end
it 'increments the prometheus counter' do
expect(Gitlab::Metrics).to receive(:counter)
.with(:pipelines_created_count, "Pipelines created count")
.and_call_original
pipeline
end
context 'when merge requests already exist for this source branch' do context 'when merge requests already exist for this source branch' do
it 'updates head pipeline of each merge request' do it 'updates head pipeline of each merge request' do
merge_request_1 = create(:merge_request, source_branch: 'master', target_branch: "branch_1", source_project: project) merge_request_1 = create(:merge_request, source_branch: 'master', target_branch: "branch_1", 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