Skip to content

Commit

Permalink
extra tests for debian, remove centos-stream-9 as they dropped suppor…
Browse files Browse the repository at this point in the history
…t for ntp
  • Loading branch information
bugoff committed Feb 11, 2024
1 parent 12586c4 commit 3e6a35f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
5 changes: 0 additions & 5 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ platforms:
image: dokken/centos-stream-8
pid_one_command: /usr/lib/systemd/systemd

- name: centos-stream-9
driver:
image: dokken/centos-stream-9
pid_one_command: /usr/lib/systemd/systemd

- name: debian-9
driver:
image: dokken/debian-9
Expand Down
20 changes: 19 additions & 1 deletion test/integration/default/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'ntp'
end

if (os.family == 'redhat') || (inspec.os.name == 'fedora')
if (os.family == 'redhat' && os.release.to_i >= 8) || (inspec.os.name == 'fedora' && os.release.to_i >= 34)
describe file '/etc/ntp.conf' do
it { should_not be_file }
end
Expand All @@ -19,10 +19,28 @@
it { should_not be_enabled }
it { should_not be_running }
end
elseif (os.family == 'redhat' && os.release.to_i >= 8)
describe file '/usr/share/zoneinfo/leapseconds' do
it { should be_file }
end
elsif os.family == 'debian'
describe file '/etc/ntp.conf' do
it { should be_file }
end

describe ntp_conf do
its('tos') { should eq 'maxdist 1' }
end

describe file '/usr/share/zoneinfo/leap-seconds.list' do
it { should be_file }
end

describe service service_name do
it { should be_enabled }
it { should be_running }
end

elsif os.windows?
describe file 'C:\NTP\etc\ntp.conf' do
it { should be_file }
Expand Down

0 comments on commit 3e6a35f

Please sign in to comment.