Skip to content

Commit

Permalink
Add tests for detecting double blank lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrekh committed Jul 13, 2020
1 parent a8dadce commit dc9c9d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/classes/chrony_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand All @@ -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')
Expand All @@ -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') }
Expand All @@ -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') }
Expand Down

0 comments on commit dc9c9d6

Please sign in to comment.