diff options
author | Paul Charlton <techguru@byiq.com> | 2017-07-11 03:35:47 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-07-11 03:35:47 +0000 |
commit | cb3b4a15e6913bc28ee2ecaab017a4c3f08c438e (patch) | |
tree | dc3915aa94508d76df2480a8e26ec4b33797a320 /spec/controllers | |
parent | 4daa6da5407d235cbe4f7a787eaa29304446a870 (diff) | |
download | gitlab-ce-cb3b4a15e6913bc28ee2ecaab017a4c3f08c438e.tar.gz |
Support multiple Redis instances based on queue type
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/health_controller_spec.rb | 8 | ||||
-rw-r--r-- | spec/controllers/metrics_controller_spec.rb | 24 | ||||
-rw-r--r-- | spec/controllers/sessions_controller_spec.rb | 2 |
3 files changed, 31 insertions, 3 deletions
diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb index e7c19b47a6a..241c36620d1 100644 --- a/spec/controllers/health_controller_spec.rb +++ b/spec/controllers/health_controller_spec.rb @@ -19,7 +19,9 @@ describe HealthController do it 'returns proper response' do get :readiness expect(json_response['db_check']['status']).to eq('ok') - expect(json_response['redis_check']['status']).to eq('ok') + expect(json_response['cache_check']['status']).to eq('ok') + expect(json_response['queues_check']['status']).to eq('ok') + expect(json_response['shared_state_check']['status']).to eq('ok') expect(json_response['fs_shards_check']['status']).to eq('ok') expect(json_response['fs_shards_check']['labels']['shard']).to eq('default') end @@ -42,7 +44,9 @@ describe HealthController do it 'returns proper response' do get :liveness expect(json_response['db_check']['status']).to eq('ok') - expect(json_response['redis_check']['status']).to eq('ok') + expect(json_response['cache_check']['status']).to eq('ok') + expect(json_response['queues_check']['status']).to eq('ok') + expect(json_response['shared_state_check']['status']).to eq('ok') expect(json_response['fs_shards_check']['status']).to eq('ok') end end diff --git a/spec/controllers/metrics_controller_spec.rb b/spec/controllers/metrics_controller_spec.rb index 044c9f179ed..c46dd92b454 100644 --- a/spec/controllers/metrics_controller_spec.rb +++ b/spec/controllers/metrics_controller_spec.rb @@ -35,6 +35,30 @@ describe MetricsController do expect(response.body).to match(/^redis_ping_latency [0-9\.]+$/) end + it 'returns Caching ping metrics' do + get :index + + expect(response.body).to match(/^redis_cache_ping_timeout 0$/) + expect(response.body).to match(/^redis_cache_ping_success 1$/) + expect(response.body).to match(/^redis_cache_ping_latency [0-9\.]+$/) + end + + it 'returns Queues ping metrics' do + get :index + + expect(response.body).to match(/^redis_queues_ping_timeout 0$/) + expect(response.body).to match(/^redis_queues_ping_success 1$/) + expect(response.body).to match(/^redis_queues_ping_latency [0-9\.]+$/) + end + + it 'returns SharedState ping metrics' do + get :index + + expect(response.body).to match(/^redis_shared_state_ping_timeout 0$/) + expect(response.body).to match(/^redis_shared_state_ping_success 1$/) + expect(response.body).to match(/^redis_shared_state_ping_latency [0-9\.]+$/) + end + it 'returns file system check metrics' do get :index diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index bf922260b2f..2b4e8723b48 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -47,7 +47,7 @@ describe SessionsController do end end - context 'when using valid password', :redis do + context 'when using valid password', :clean_gitlab_redis_shared_state do include UserActivitiesHelpers let(:user) { create(:user) } |