1 # frozen_string_literal: true
3 control 'TEMPLATE configuration' do
4 title 'should match desired lines'
6 describe file('/etc/template-formula.conf') do
8 it { should be_owned_by 'root' }
9 it { should be_grouped_into 'root' }
10 its('mode') { should cmp '0644' }
13 'This is another example file from SaltStack template-formula.'
16 its('content') { should include '"added_in_pillar": "pillar_value"' }
17 its('content') { should include '"added_in_defaults": "defaults_value"' }
18 its('content') { should include '"added_in_lookup": "lookup_value"' }
19 its('content') { should include '"config": "/etc/template-formula.conf"' }
20 its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' }
21 its('content') { should include '"pkg": {"name": "' }
22 its('content') { should include '"service": {"name": "' }
25 '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\
26 '"roles", "osfinger", "os", "os_family"], "source_files": '\
27 '{"TEMPLATE-config-file-file-managed": ["example.tmpl.jinja"], '\
28 '"TEMPLATE-subcomponent-config-file-file-managed": '\
29 '["subcomponent-example.tmpl.jinja"]}'
32 its('content') { should include '"arch": "amd64"' }
33 its('content') { should include '"winner": "pillar"}' }
34 its('content') { should include 'winner of the merge: pillar' }