Skip to content
Snippets Groups Projects
Commit d49d3fc36f8d authored by Igor Wiedler's avatar Igor Wiedler
Browse files

redis: add spec for lazyfree

parent b18378b3e0fd
No related merge requests found
......@@ -23,6 +23,8 @@
expect(content).to match(/^maxmemory-samples 5/)
expect(content).to match(/^tcp-backlog 511/)
expect(content).to match(/^rename-command KEYS ""$/)
expect(content).to match(/^lazyfree-lazy-eviction no$/)
expect(content).to match(/^lazyfree-lazy-expire no$/)
expect(content).not_to match(/^slaveof/)
}
end
......@@ -215,6 +217,24 @@
end
end
context 'with lazy eviction enabled' do
before do
stub_gitlab_rb(
redis: {
lazyfree_lazy_eviction: true
}
)
end
it 'creates redis config with lazyfree-lazy-eviction yes' do
expect(chef_run).to render_file('/var/opt/gitlab/redis/redis.conf')
.with_content { |content|
expect(content).to match(/^lazyfree-lazy-eviction yes$/)
expect(content).to match(/^lazyfree-lazy-expire no$/)
}
end
end
context 'with redis disabled' do
before do
stub_gitlab_rb(redis: { enable: false })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment