Commit c7e4f44e authored by Matthias Kaeppler's avatar Matthias Kaeppler

Bring back Unicorn HttpServer check

Turns out this is actually necessary in some places
parent cd29a8f9
......@@ -34,7 +34,7 @@ module Gitlab
# For unicorn, we need to check for actual server instances to avoid false positives.
def unicorn?
!!defined?(::Unicorn)
!!(defined?(::Unicorn) && defined?(::Unicorn::HttpServer))
end
def sidekiq?
......
......@@ -41,9 +41,11 @@ describe Gitlab::Runtime do
context "unicorn" do
let(:unicorn_type) { Module.new }
let(:unicorn_server_type) { Class.new }
before do
stub_const('::Unicorn', unicorn_type)
stub_const('::Unicorn::HttpServer', unicorn_server_type)
end
it "identifies itself" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment