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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 18:07:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 18:07:47 +0300
commit6f2065c468b05658125b746169c56764a8ccddb1 (patch)
tree544a488ae2e65e2fcfe4acce4e56623b85bbce5e /spec/lib
parente6baeabaa9651d90b03bb64ffce75a2c3cb89aab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git_access_snippet_spec.rb10
-rw-r--r--spec/lib/gitlab/middleware/rails_queue_duration_spec.rb9
2 files changed, 8 insertions, 11 deletions
diff --git a/spec/lib/gitlab/git_access_snippet_spec.rb b/spec/lib/gitlab/git_access_snippet_spec.rb
index 877a760152d..f52fe8ef612 100644
--- a/spec/lib/gitlab/git_access_snippet_spec.rb
+++ b/spec/lib/gitlab/git_access_snippet_spec.rb
@@ -209,16 +209,6 @@ describe Gitlab::GitAccessSnippet do
expect { push_access_check }.to raise_forbidden('foo')
end
-
- context 'when feature flag :snippet_count_check is disabled' do
- it 'does not check push file count' do
- stub_feature_flags(snippet_count_check: false)
-
- expect(Gitlab::Checks::PushFileCountCheck).not_to receive(:new)
-
- expect { push_access_check }.not_to raise_error
- end
- end
end
private
diff --git a/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb b/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
index 31359abdce3..4f21bd14122 100644
--- a/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
+++ b/spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
@@ -9,7 +9,7 @@ describe Gitlab::Middleware::RailsQueueDuration do
let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) }
before do
- expect(app).to receive(:call).with(env).and_return('yay')
+ allow(app).to receive(:call).with(env).and_return('yay')
end
describe '#call' do
@@ -42,6 +42,13 @@ describe Gitlab::Middleware::RailsQueueDuration do
expect(middleware.call(env)).to eq('yay')
end
end
+
+ it 'creates a metric with a docstring' do
+ metric = middleware.send(:metric_rails_queue_duration_seconds)
+
+ expect(metric).to be_instance_of(Prometheus::Client::Histogram)
+ expect(metric.docstring).to eq('Measures latency between GitLab Workhorse forwarding a request to Rails')
+ end
end
end
end