diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-05-22 19:36:49 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-05-22 19:44:54 +0200 |
commit | 1f10a3c224dffc674e5cb6f4a719bb8b12e629d8 (patch) | |
tree | f6ef1445c8475d77fec25790256261ecd2e19cab | |
parent | 6ced4d138e56a82fc460d6281ae445fb7b739636 (diff) | |
download | gitlab-ce-1f10a3c224dffc674e5cb6f4a719bb8b12e629d8.tar.gz |
Stop skipping tests if local dependencies are not found
-rw-r--r-- | spec/lib/gitlab/health_checks/fs_shards_check_spec.rb | 6 | ||||
-rw-r--r-- | spec/support/timeout_helper.rb | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/spec/lib/gitlab/health_checks/fs_shards_check_spec.rb b/spec/lib/gitlab/health_checks/fs_shards_check_spec.rb index 289c93ecde7..2a174547b31 100644 --- a/spec/lib/gitlab/health_checks/fs_shards_check_spec.rb +++ b/spec/lib/gitlab/health_checks/fs_shards_check_spec.rb @@ -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) diff --git a/spec/support/timeout_helper.rb b/spec/support/timeout_helper.rb index 8b1c14ad2d5..94d50049569 100644 --- a/spec/support/timeout_helper.rb +++ b/spec/support/timeout_helper.rb @@ -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') |