summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-04-20 14:51:38 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-04-26 16:39:12 +0200
commitb325d4a658bd884d2d10b832032296e9e28bcc24 (patch)
tree3cee11210c8f7a8e534df247e77049719ffbfe50 /app
parenta9da37434af6d44c5f851affd4bd69b370760e8e (diff)
downloadgitlab-ce-b325d4a658bd884d2d10b832032296e9e28bcc24.tar.gz
Add test that asserts unicorns terminate
Diffstat (limited to 'app')
-rw-r--r--app/controllers/unicorn_test_controller.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/unicorn_test_controller.rb b/app/controllers/unicorn_test_controller.rb
new file mode 100644
index 00000000000..b7a1a046be0
--- /dev/null
+++ b/app/controllers/unicorn_test_controller.rb
@@ -0,0 +1,12 @@
+if Rails.env.test?
+ class UnicornTestController < ActionController::Base
+ def pid
+ render plain: Process.pid.to_s
+ end
+
+ def kill
+ Process.kill(params[:signal], Process.pid)
+ render plain: 'Bye!'
+ end
+ end
+end