Created
December 8, 2017 09:55
-
-
Save cjeanneret/2199d08626de3fcc36954f8787bb3c1e to your computer and use it in GitHub Desktop.
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
# tripleo firewall service_rules | |
'tripleo.dynamic_rules.firewall_rules': | |
'11-neutron': | |
port: 1138 |
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
require 'spec_helper' | |
describe 'tripleo::firewall::service_rules' do | |
let :pre_condition do | |
'include ::tripleo::firewall' | |
end | |
shared_examples_for 'tripleo firewall service rules' do | |
context 'with existing service_rules' do | |
let(:title) { 'dynamic-rules' } | |
it 'should compile' do | |
is_expected.to compile.with_all_deps | |
end | |
it 'should configure firewall' do | |
is_expected.to contain_tripleo__firewall__rule('11-neutron') | |
end | |
end | |
context 'with NON-existing service_rules' do | |
let(:title) { 'no-rules' } | |
it 'should compile' do | |
is_expected.to compile.with_all_deps | |
end | |
end | |
end | |
context 'on Debian platforms' do | |
let :facts do | |
{ :osfamily => 'Debian', | |
:hostname => 'myhost' } | |
end | |
it_configures 'tripleo firewall service rules' | |
end | |
context 'on RedHat platforms' do | |
let :facts do | |
{ :osfamily => 'RedHat', | |
:hostname => 'myhost' } | |
end | |
it_configures 'tripleo firewall service rules' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment