Commit 6e62aab2 authored by Nick Thomas's avatar Nick Thomas

Relax the custom git config check for Geo secondaries

parent ed92fc8e
......@@ -10,10 +10,10 @@ module SystemCheck
].freeze
set_name 'Git user has default SSH configuration?'
set_skip_reason 'skipped (git user is not present or configured)'
set_skip_reason 'skipped (Geo secondary, or git user is not present / configured)'
def skip?
!home_dir || !File.directory?(home_dir)
Gitlab::Geo.secondary? || !home_dir || !File.directory?(home_dir)
end
def check?
......
......@@ -34,6 +34,15 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do
it { is_expected.to eq(expected_result) }
end
# EE-only
it 'skips Geo secondaries' do
stub_user
stub_home_dir
allow(Gitlab::Geo).to receive(:secondary?).and_return(true)
is_expected.to be_truthy
end
end
describe '#check?' 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