Commit 1f10a3c2 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Stop skipping tests if local dependencies are not found

parent 6ced4d13
......@@ -109,9 +109,7 @@ describe Gitlab::HealthChecks::FsShardsCheck do
let(:timeout_seconds) { 1.to_s }
before do
skip 'timeout or gtimeout not available' unless any_timeout_command_exists?
allow(described_class).to receive(:with_timeout) { [timeout_command, timeout_seconds].concat(%w{ sleep 2 }) }
allow(described_class).to receive(:with_timeout) { [timeout_command, timeout_seconds, 'sleep', 2] }
FileUtils.chmod_R(0755, tmp_dir)
end
......@@ -137,8 +135,6 @@ describe Gitlab::HealthChecks::FsShardsCheck do
context 'when popen always finds required binaries' do
let(:timeout_seconds) { 30.to_s }
before do
skip 'timeout or gtimeout not available' unless any_timeout_command_exists?
allow(described_class).to receive(:exec_with_timeout).and_wrap_original do |method, *args, &block|
begin
method.call(*args, &block)
......
......@@ -6,10 +6,6 @@ module TimeoutHelper
false
end
def any_timeout_command_exists?
command_exists?('timeout') || command_exists?('gtimeout')
end
def timeout_command
@timeout_command ||=
if command_exists?('timeout')
......
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