Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb
index f82e49f9323..ea04862ed74 100644
--- a/spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/chain/sequence_spec.rb
@@ -56,11 +56,24 @@ describe Gitlab::Ci::Pipeline::Chain::Sequence do
end
it 'adds sequence duration to duration histogram' do
- allow(command).to receive(:duration_histogram).and_return(histogram)
+ allow(command.metrics)
+ .to receive(:pipeline_creation_duration_histogram)
+ .and_return(histogram)
subject.build!
expect(histogram).to have_received(:observe)
end
+
+ it 'records pipeline size by pipeline source in a histogram' do
+ allow(command.metrics)
+ .to receive(:pipeline_size_histogram)
+ .and_return(histogram)
+
+ subject.build!
+
+ expect(histogram).to have_received(:observe)
+ .with({ source: 'push' }, 0)
+ end
end
end