mirror of
https://github.com/saltstack-formulas/timezone-formula.git
synced 2024-12-03 23:10:48 +01:00
23 lines
494 B
Ruby
23 lines
494 B
Ruby
|
control 'Timezone configuration' do
|
||
|
title 'should match desired lines'
|
||
|
|
||
|
def test_file_content(config_file)
|
||
|
describe file(config_file) do
|
||
|
its('content') { should include 'Europe/Paris' }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def test_symlink(config_file)
|
||
|
describe file(config_file) do
|
||
|
its('link_path') { should eq '/usr/share/zoneinfo/Europe/Paris' }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
case os[:family]
|
||
|
when 'debian'
|
||
|
test_file_content('/etc/timezone')
|
||
|
else
|
||
|
test_symlink('/etc/localtime')
|
||
|
end
|
||
|
end
|