diff --git a/test/integration/default/controls/zones_spec.rb b/test/integration/default/controls/zones_spec.rb new file mode 100644 index 0000000..82382ba --- /dev/null +++ b/test/integration/default/controls/zones_spec.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +control 'zones/public.xml configuration' do + title 'should match desired lines' + + describe file('/etc/firewalld/zones/public.xml') do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0644' } + its('content') do + should include <<~ZONE_XML + + Public + For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. + + + + + + + + + + + + + + + + + + + + + + + + + + ZONE_XML + end + end +end + +control 'zones/rich_public.xml configuration' do + title 'should match desired lines' + + describe file('/etc/firewalld/zones/rich_public.xml') do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0644' } + its('content') do + should include <<~ZONE_XML + + rich_public + Example + + + + + + + + + + + + ZONE_XML + end + end +end