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:
authorKamil Trzciński <ayufan@ayufan.eu>2019-07-10 12:43:51 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-11 11:38:12 +0300
commit56eb9f6c0ee719d06a0cccce8f815922d35b3b05 (patch)
treed0d1533a6751a0e0e9f9bce00a2c277ba52a7a14 /config/routes.rb
parent92fac459533d5afeea3b302ca7634767e0ff110b (diff)
Add `db_spin` and refactor ChaosController
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a42fc037227..6ddfaf741f1 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -106,11 +106,14 @@ Rails.application.routes.draw do
draw :jira_connect
end
- if ENV['GITLAB_ENABLE_CHAOS_ENDPOINTS']
- get '/chaos/leakmem' => 'chaos#leakmem'
- get '/chaos/cpuspin' => 'chaos#cpuspin'
- get '/chaos/sleep' => 'chaos#sleep'
- get '/chaos/kill' => 'chaos#kill'
+ if ENV['GITLAB_CHAOS_SECRET'] || Rails.env.development?
+ resource :chaos, only: [] do
+ get :leakmem
+ get :cpu_spin
+ get :db_spin
+ get :sleep
+ get :kill
+ end
end
end