Skip to content

Commit

Permalink
Fix tests to work with rspec-puppet 2.8.0
Browse files Browse the repository at this point in the history
2.7.9 contained rodjek/rspec-puppet#781 and that
broke our tests.

2.7.9 was pulled from rubygems, but this breaking change is back in
2.8.0 :(
  • Loading branch information
alexjfisher committed Nov 16, 2020
1 parent 66961ef commit f3814fa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions spec/classes/chrony_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
it { is_expected.to contain_file('/etc/chrony.keys').with_owner('0') }
it { is_expected.to contain_file('/etc/chrony.keys').with_group('0') }
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content("0 xyzzy\n") }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive("0 xyzzy\n")) }
end
when 'Gentoo'
context 'using defaults' do
Expand All @@ -72,7 +72,7 @@
with_owner('0').
with_group('0').
with_replace(true).
with_content("0 xyzzy\n")
with_content(sensitive("0 xyzzy\n"))
end
end
when 'RedHat'
Expand All @@ -91,7 +91,7 @@
it { is_expected.to contain_file('/etc/chrony.keys').with_owner('0') }
it { is_expected.to contain_file('/etc/chrony.keys').with_group('chrony') }
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content("0 xyzzy\n") }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive("0 xyzzy\n")) }
end
when 'Debian'
context 'using defaults' do
Expand All @@ -109,7 +109,7 @@
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') }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content("0 xyzzy\n") }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content(sensitive("0 xyzzy\n")) }
end
end
end
Expand Down Expand Up @@ -157,7 +157,7 @@
it { is_expected.to contain_file('/etc/chrony.keys').with_owner('steve') }
it { is_expected.to contain_file('/etc/chrony.keys').with_group('mrt') }
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content("0 sunny\n") }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive("0 sunny\n")) }
end
when 'RedHat'
context 'with some params passed in' do
Expand All @@ -182,7 +182,7 @@
it { is_expected.to contain_file('/etc/chrony.keys').with_owner('steve') }
it { is_expected.to contain_file('/etc/chrony.keys').with_group('mrt') }
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content("0 sunny\n") }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive("0 sunny\n")) }
end
when 'Debian', 'Gentoo'
context 'with some params passed in' do
Expand All @@ -206,7 +206,7 @@
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_owner('steve') }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_group('mrt') }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_replace(true) }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content("0 sunny\n") }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content(sensitive("0 sunny\n")) }
end
end
end
Expand Down Expand Up @@ -250,17 +250,17 @@
when 'Archlinux'
context 'unmanaged chrony.keys file' do
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(false) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content('') }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive('')) }
end
when 'RedHat'
context 'unmanaged chrony.keys file' do
it { is_expected.to contain_file('/etc/chrony.keys').with_replace(false) }
it { is_expected.to contain_file('/etc/chrony.keys').with_content('') }
it { is_expected.to contain_file('/etc/chrony.keys').with_content(sensitive('')) }
end
when 'Debian', 'Gentoo'
context 'unmanaged chrony.keys file' do
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_replace(false) }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content('') }
it { is_expected.to contain_file('/etc/chrony/chrony.keys').with_content(sensitive('')) }
end
end
end
Expand Down

0 comments on commit f3814fa

Please sign in to comment.