Skip to content

Commit

Permalink
Support Ubuntu Focal
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsreichenbach authored and ekohl committed May 13, 2020
1 parent 4c5c2a3 commit 72ef3f7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- debian10-64
- fedora31-64
- ubuntu1804-64
- ubuntu2004-64
env:
global:
- PARALLEL_TEST_PROCESSORS=8
Expand Down
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,16 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- BEAKER_setfile=ubuntu2004-64{hostname=ubuntu2004-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

bundler_args: --without system_tests development
dist: xenial
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04"
"18.04",
"20.04"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions spec/classes/puppet_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

it { is_expected.to contain_class('puppet::agent::service::systemd').with_enabled(false) }
case os
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/, /\Aarchlinux-/
it do
is_expected.to contain_exec('systemctl-daemon-reload-puppet')
.with_refreshonly(true)
Expand Down Expand Up @@ -188,7 +188,7 @@
case os
when /\A(windows|archlinux)/
it { is_expected.to raise_error(Puppet::Error, /Runmode of cron not supported on #{facts[:kernel]} operating systems!/) }
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_concat__fragment('puppet.conf_agent') }
if facts[:osfamily] == 'Debian'
Expand Down Expand Up @@ -247,7 +247,7 @@
case os
when /\A(windows|archlinux)/
it { is_expected.to raise_error(Puppet::Error, /Runmode of cron not supported on #{facts[:kernel]} operating systems!/) }
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/
it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(true) }
it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) }
it do
Expand Down Expand Up @@ -288,7 +288,7 @@
end

case os
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/, /\Aarchlinux-/
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) }
it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(false) }
Expand Down Expand Up @@ -337,7 +337,7 @@
end

case os
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/, /\Aarchlinux-/
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) }
it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(false) }
Expand Down Expand Up @@ -391,7 +391,7 @@
it { is_expected.to contain_class('puppet::agent::service::systemd').with_enabled(false) }

case os
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-(7|8)/, /\Afedora-/, /\Aubuntu-/, /\Aarchlinux-/
it { is_expected.to contain_service('puppet-run.timer').with_ensure(:stopped) }
else
it { is_expected.not_to contain_service('puppet-run.timer') }
Expand Down
3 changes: 2 additions & 1 deletion spec/support/acceptance/puppetserver.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
def unsupported_puppetserver
host_inventory['facter']['os']['name'] == 'Fedora'
host_inventory['facter']['os']['name'] == 'Fedora' ||
(host_inventory['facter']['os']['name'] == 'Ubuntu' && host_inventory['facter']['os']['distro']['codename'] == 'focal')
end

0 comments on commit 72ef3f7

Please sign in to comment.