Skip to content
代码片段 群组 项目
提交 f9e7aa19 编辑于 作者: Aakriti Gupta's avatar Aakriti Gupta
浏览文件

Database should be read-only in maintenance mode

上级 94076566
No related branches found
No related tags found
无相关合并请求
......@@ -10,7 +10,7 @@ module Database
override :read_only?
def read_only?
::Gitlab::Geo.secondary?
::Gitlab::Geo.secondary? || ::Gitlab.maintenance_mode?
end
def healthy?
......
......@@ -34,6 +34,16 @@
expect(described_class.read_only?).to be_falsey
end
end
context 'in maintenance mode' do
before do
stub_application_setting(maintenance_mode: true)
end
it 'returns true' do
expect(described_class.read_only?).to be_truthy
end
end
end
describe '.healthy?' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册