diff options
Diffstat (limited to 'spec/classes/tripleo_profile_base_swift_proxy_spec.rb')
-rw-r--r-- | spec/classes/tripleo_profile_base_swift_proxy_spec.rb | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/spec/classes/tripleo_profile_base_swift_proxy_spec.rb b/spec/classes/tripleo_profile_base_swift_proxy_spec.rb index da80950..68d7dde 100644 --- a/spec/classes/tripleo_profile_base_swift_proxy_spec.rb +++ b/spec/classes/tripleo_profile_base_swift_proxy_spec.rb @@ -21,7 +21,7 @@ describe 'tripleo::profile::base::swift::proxy' do { } end - shared_examples_for 'tripleo swift proxy base profile' do + shared_examples_for 'tripleo::profile::base::swift::proxy' do let :pre_condition do "class { '::swift': @@ -63,27 +63,30 @@ describe 'tripleo::profile::base::swift::proxy' do end end - end + context 'with ipv4, ipv6 and fqdn memcache servers' do + before :each do + params.merge!( + :step => 4, + :memcache_servers => ['192.168.0.1', '::2', 'myserver.com'], + ) + end - context 'on Debian platforms' do - let :facts do - { :osfamily => 'Debian', - :processorcount => 1 } + it 'configure swift proxy cache with ips and fqdn' do + is_expected.to contain_class('swift::proxy::cache').with({ + :memcache_servers => ['192.168.0.1:11211', '[::2]:11211', 'myserver.com:11211'] + }) + end end - it_configures 'tripleo swift proxy base profile' end - context 'on RedHat platforms' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '7.1', - :processorcount => 1, - } - end + on_supported_os.each do |os, facts| + context "on #{os}" do + let(:facts) do + facts.merge({}) + end - it_configures 'tripleo swift proxy base profile' + it_behaves_like 'tripleo::profile::base::swift::proxy' + end end - end |