Commit 48ce8a0a authored by Stan Hu's avatar Stan Hu

Merge branch 'ash.mckenzie/improve-exception-when-not-secondary' into 'master'

Improve exception message when not a secondary

See merge request gitlab-org/gitlab-ee!7320
parents 7defb7fd b6db9817
...@@ -93,7 +93,7 @@ module Gitlab ...@@ -93,7 +93,7 @@ module Gitlab
end end
def ensure_secondary! def ensure_secondary!
raise MustBeASecondaryNode, 'Node is not a secondary' unless Gitlab::Geo.secondary_with_primary? raise MustBeASecondaryNode, 'Node is not a secondary or there is no primary Geo node' unless Gitlab::Geo.secondary_with_primary?
end end
end end
end end
......
...@@ -49,7 +49,7 @@ describe Gitlab::Geo::GitPushSSHProxy, :geo do ...@@ -49,7 +49,7 @@ describe Gitlab::Geo::GitPushSSHProxy, :geo do
it 'raises an exception' do it 'raises an exception' do
expect do expect do
subject.info_refs subject.info_refs
end.to raise_error(described_class::MustBeASecondaryNode) end.to raise_error(described_class::MustBeASecondaryNode, 'Node is not a secondary or there is no primary Geo node')
end end
end end
......
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