-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #32917 - Don't deploy or configure Redis with new tasking system
- Loading branch information
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
require 'spec_helper' | ||
|
||
describe 'pulpcore' do | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let(:facts) { override_facts(os_facts, os: {selinux: {enabled: true}}) } | ||
|
||
context 'postgresql tasking system and content cache disabled' do | ||
let(:params) do | ||
{ | ||
use_rq_tasking_system: false, | ||
cache_enabled: false, | ||
} | ||
end | ||
|
||
it 'does not include redis' do | ||
is_expected.not_to contain_class('redis') | ||
end | ||
|
||
it 'does not configure pulpcore connection to redis' do | ||
is_expected.to contain_concat__fragment('base') | ||
.without_content(/REDIS_HOST/) | ||
.without_content(/REDIS_PORT/) | ||
.without_content(/REDIS_DB/) | ||
end | ||
end | ||
|
||
context 'rq tasking system and content cache disabled' do | ||
let(:params) do | ||
{ | ||
use_rq_tasking_system: true, | ||
cache_enabled: false, | ||
} | ||
end | ||
|
||
it 'includes redis' do | ||
is_expected.to contain_class('redis') | ||
end | ||
|
||
it 'configures pulpcore connection to redis' do | ||
is_expected.to contain_concat__fragment('base') | ||
.with_content(/REDIS_HOST/) | ||
.with_content(/REDIS_PORT/) | ||
.with_content(/REDIS_DB/) | ||
end | ||
end | ||
|
||
context 'postgresql tasking system and content cache enabled' do | ||
let(:params) do | ||
{ | ||
use_rq_tasking_system: false, | ||
cache_enabled: true, | ||
} | ||
end | ||
|
||
it 'includes redis' do | ||
is_expected.to contain_class('redis') | ||
end | ||
|
||
it 'configures pulpcore connection to redis' do | ||
is_expected.to contain_concat__fragment('base') | ||
.with_content(/REDIS_HOST/) | ||
.with_content(/REDIS_PORT/) | ||
.with_content(/REDIS_DB/) | ||
end | ||
end | ||
|
||
context 'rq tasking system and content cache enabled' do | ||
let(:params) do | ||
{ | ||
use_rq_tasking_system: true, | ||
cache_enabled: true, | ||
} | ||
end | ||
|
||
it 'includes redis' do | ||
is_expected.to contain_class('redis') | ||
end | ||
|
||
it 'configures pulpcore connection to redis' do | ||
is_expected.to contain_concat__fragment('base') | ||
.with_content(/REDIS_HOST/) | ||
.with_content(/REDIS_PORT/) | ||
.with_content(/REDIS_DB/) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters