summaryrefslogtreecommitdiff
path: root/spec/controllers/metrics_controller_spec.rb
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-05-29 23:23:19 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-02 19:45:58 +0200
commitae8f7666e597493ab404f8524c1216a924338291 (patch)
tree1e7684337782584f90b8b8a9d3e5980393e633c7 /spec/controllers/metrics_controller_spec.rb
parentc134a72cdb7e6de8b70dc60de99cf4edc68a9227 (diff)
downloadgitlab-ce-ae8f7666e597493ab404f8524c1216a924338291.tar.gz
Add prometheus text formatter
+ rename controler method to #index from #metrics + remove assertion from nullMetric
Diffstat (limited to 'spec/controllers/metrics_controller_spec.rb')
-rw-r--r--spec/controllers/metrics_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/metrics_controller_spec.rb b/spec/controllers/metrics_controller_spec.rb
index 7baf7d1bef9..b26ebc1377b 100644
--- a/spec/controllers/metrics_controller_spec.rb
+++ b/spec/controllers/metrics_controller_spec.rb
@@ -19,14 +19,14 @@ describe MetricsController do
allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(true)
end
- describe '#metrics' do
+ describe '#index' do
context 'authorization token provided' do
before do
request.headers['TOKEN'] = token
end
it 'returns DB ping metrics' do
- get :metrics
+ get :index
expect(response.body).to match(/^db_ping_timeout 0$/)
expect(response.body).to match(/^db_ping_success 1$/)
@@ -34,7 +34,7 @@ describe MetricsController do
end
it 'returns Redis ping metrics' do
- get :metrics
+ get :index
expect(response.body).to match(/^redis_ping_timeout 0$/)
expect(response.body).to match(/^redis_ping_success 1$/)
@@ -42,7 +42,7 @@ describe MetricsController do
end
it 'returns file system check metrics' do
- get :metrics
+ get :index
expect(response.body).to match(/^filesystem_access_latency{shard="default"} [0-9\.]+$/)
expect(response.body).to match(/^filesystem_accessible{shard="default"} 1$/)
@@ -58,7 +58,7 @@ describe MetricsController do
end
it 'returns proper response' do
- get :metrics
+ get :index
expect(response.status).to eq(404)
end
@@ -67,7 +67,7 @@ describe MetricsController do
context 'without authorization token' do
it 'returns proper response' do
- get :metrics
+ get :index
expect(response.status).to eq(404)
end