Commit 79a2787d authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '339979-fix-memoization-of-stub-in-spec' into 'master'

Clear memoization of a stubbed object

See merge request gitlab-org/gitlab!69521
parents e7144b5c 57508ba7
......@@ -4,9 +4,15 @@ require 'spec_helper'
RSpec.describe ::Gitlab::Ci::Pipeline::Metrics do
describe '.pipeline_creation_step_duration_histogram' do
it 'adds the step to the step duration histogram' do
around do |example|
described_class.clear_memoization(:pipeline_creation_step_histogram)
example.run
described_class.clear_memoization(:pipeline_creation_step_histogram)
end
it 'adds the step to the step duration histogram' do
expect(::Gitlab::Metrics).to receive(:histogram)
.with(
:gitlab_ci_pipeline_creation_step_duration_seconds,
......
......@@ -19,7 +19,7 @@ RSpec.describe 'Terraform/Base.latest.gitlab-ci.yml' do
allow(project).to receive(:default_branch).and_return(default_branch)
end
it 'does not create any jobs', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339979' do
it 'does not create any jobs' do
expect(build_names).to be_empty
end
end
......
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