diff --git a/spec/classes/chrony_spec.rb b/spec/classes/chrony_spec.rb index 2b43a7d..ab21ac9 100644 --- a/spec/classes/chrony_spec.rb +++ b/spec/classes/chrony_spec.rb @@ -34,6 +34,7 @@ it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*driftfile /var/lib/chrony/drift$}) } it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*rtcsync$}) } it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*dumpdir /var/log/chrony$}) } + it { is_expected.to contain_file('/etc/chrony.conf').without_content(%r{^\s*\n\s*$}) } it { is_expected.to contain_file('/etc/chrony.keys').with_mode('0644') } it { is_expected.to contain_file('/etc/chrony.keys').with_owner('0') } it { is_expected.to contain_file('/etc/chrony.keys').with_group('0') } @@ -53,6 +54,7 @@ .with_content(%r{^\s*driftfile /var/lib/chrony/drift$}) .with_content(%r{^\s*rtcsync$}) .without_content(%r{^\s*dumpdir}) + .without_content(%r{^\s*\n\s*$}) end it do is_expected.to contain_file('/etc/chrony/chrony.keys') @@ -74,6 +76,7 @@ it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*driftfile /var/lib/chrony/drift$}) } it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*rtcsync$}) } it { is_expected.to contain_file('/etc/chrony.conf').without_content(%r{^\s*dumpdir}) } + it { is_expected.to contain_file('/etc/chrony.conf').without_content(%r{^\s*\n\s*$}) } it { is_expected.to contain_file('/etc/chrony.keys').with_mode('0640') } it { is_expected.to contain_file('/etc/chrony.keys').with_owner('0') } it { is_expected.to contain_file('/etc/chrony.keys').with_group('chrony') } @@ -91,6 +94,7 @@ it { is_expected.to contain_file('/etc/chrony/chrony.conf').with_content(%r{^\s*driftfile /var/lib/chrony/drift$}) } it { is_expected.to contain_file('/etc/chrony/chrony.conf').with_content(%r{^\s*rtcsync$}) } it { is_expected.to contain_file('/etc/chrony/chrony.conf').without_content(%r{^\s*dumpdir}) } + it { is_expected.to contain_file('/etc/chrony/chrony.conf').without_content(%r{^\s*\n\s*$}) } it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_mode('0640') } it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_owner('0') } it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_group('0') }