Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: CI

on:
pull_request:
push:
branches:
- 'develop'
- 'master'
- '*-stable'


concurrency:
Expand All @@ -12,8 +17,7 @@ concurrency:
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3
with:
pidfile_workaround: 'true'
rubocop: false
cache-version: '1'
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ gem 'rake'

gem 'kafo_module_lint', {"groups"=>["test"]}
gem 'puppet-lint-spaceship_operator_without_tag-check', '~> 1.0', {"groups"=>["test"]}
gem 'voxpupuli-test', '~> 7.0', {"groups"=>["test"]}
gem 'voxpupuli-test', '~> 9.0', {"groups"=>["test"]}
gem 'github_changelog_generator', '>= 1.15.0', {"groups"=>["development"]}
gem 'puppet_metadata', '~> 4.0'
gem 'puppet-blacksmith', '>= 6.0.0', {"groups"=>["development"]}
gem 'voxpupuli-acceptance', '~> 3.0', {"groups"=>["system_tests"]}
gem 'voxpupuli-acceptance', '~> 3.4', {"groups"=>["system_tests"]}
gem 'puppetlabs_spec_helper', {"groups"=>["system_tests"]}
gem 'hocon'

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/puppetserver_upgrade_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
raise 'Unsupported Puppet collection'
end

case fact('osfamily')
case fact('os.family')
when 'Debian'
from_version_exact = "#{from_version}-1#{fact('os.distro.codename')}"
to_version_exact = "#{to_version}-1#{fact('os.distro.codename')}"
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/puppet_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe 'puppet' do
on_supported_os.each do |os, facts|
context "on #{os}" do
case facts[:osfamily]
case facts[:os]['family']
when 'FreeBSD'
puppet_major = facts[:puppetversion].to_i

Expand Down Expand Up @@ -41,7 +41,7 @@

describe 'with no custom parameters' do
# For windows we specify a package provider which doesn't compile
if facts[:osfamily] != 'windows'
if facts[:os]['family'] != 'windows'
it { is_expected.to compile.with_all_deps }
end

Expand Down Expand Up @@ -343,7 +343,7 @@
end

# For windows we specify a package provider which doesn't compile
if facts[:osfamily] != 'windows'
if facts[:os]['family'] != 'windows'
it { is_expected.to compile.with_all_deps }
end
it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) }
Expand All @@ -364,7 +364,7 @@
end

# For windows we specify a package provider which doesn't compile
if facts[:osfamily] != 'windows'
if facts[:os]['family'] != 'windows'
it { is_expected.to compile.with_all_deps }
end
it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) }
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/puppet_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe 'puppet' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
case os_facts[:osfamily]
case os_facts[:os]['family']
when 'FreeBSD'
dir_owner = 'root'
dir_group = nil
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/puppet_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe 'puppet' do
on_supported_os.each do |os, facts|
context "on #{os}" do
case facts[:osfamily]
case facts[:os]['family']
when 'FreeBSD'
puppet_major = facts[:puppetversion].to_i

Expand Down Expand Up @@ -33,7 +33,7 @@
end

describe 'with no custom parameters' do
it { is_expected.to compile.with_all_deps unless facts[:osfamily] == 'windows' }
it { is_expected.to compile.with_all_deps unless facts[:os]['family'] == 'windows' }
it { should contain_class('puppet::agent') }
it { should contain_class('puppet::config') }
it { should_not contain_class('puppet::server') }
Expand All @@ -45,7 +45,7 @@
}
end

describe 'with server => true', :unless => unsupported_puppetserver_osfamily(facts[:osfamily]) do
describe 'with server => true', :unless => unsupported_puppetserver_osfamily(facts[:os]['family']) do
let :params do {
:server => true,
} end
Expand Down Expand Up @@ -112,7 +112,7 @@
end

# compilation is broken due to paths
context 'on non-windows', unless: facts[:osfamily] == 'windows' do
context 'on non-windows', unless: facts[:os]['family'] == 'windows' do
describe 'with package_source => Httpurl' do
let :params do {
:package_source => 'https://example.com:123/test'
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/puppet_server_puppetdb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'puppet::server::puppetdb' do
on_supported_os.each do |os, os_facts|
context "on #{os}", unless: unsupported_puppetserver_osfamily(os_facts[:osfamily]) do
context "on #{os}", unless: unsupported_puppetserver_osfamily(os_facts[:os]['family']) do
let(:facts) { os_facts }
let(:params) { {server: 'mypuppetdb.example.com'} }
let(:pre_condition) do
Expand Down
20 changes: 10 additions & 10 deletions spec/classes/puppet_server_puppetserver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

describe 'puppet' do
on_supported_os.each do |os, facts|
next if unsupported_puppetserver_osfamily(facts[:osfamily])
next if unsupported_puppetserver_osfamily(facts[:os]['family'])
context "on #{os}" do
let(:facts) do
facts
Expand All @@ -26,7 +26,7 @@
end

let(:server_vardir) do
if ['FreeBSD', 'DragonFly'].include?(facts[:operatingsystem])
if ['FreeBSD', 'DragonFly'].include?(facts[:os]['name'])
'/var/puppet/server/data/puppetserver'
else
'/opt/puppetlabs/server/data/puppetserver'
Expand All @@ -41,7 +41,7 @@
.with_content(%r{^#puppetlabs.services.ca.certificate-authority-disabled-service/certificate-authority-disabled-service})
.with_content(%r{^puppetlabs.trapperkeeper.services.watcher.filesystem-watch-service/filesystem-watch-service})
}
if facts[:osfamily] == 'FreeBSD'
if facts[:os]['family'] == 'FreeBSD'
it {
should contain_augeas('puppet::server::puppetserver::jvm')
.with_changes(['set puppetserver_java_opts \'"-Xms2G -Xmx2G"\''])
Expand Down Expand Up @@ -343,10 +343,10 @@
end
end

describe 'server_max_open_files', unless: facts[:osfamily] == 'FreeBSD' do
describe 'server_max_open_files', unless: facts[:os]['family'] == 'FreeBSD' do
context 'when server_max_open_files => undef' do
it do
if facts['service_provider'] == 'systemd'
if facts[:service_provider] == 'systemd'
should contain_systemd__dropin_file('puppetserver.service-limits.conf')
.with_ensure('absent')
else
Expand All @@ -360,7 +360,7 @@
let(:params) { super().merge(server_max_open_files: 32143) }

it do
if facts['service_provider'] == 'systemd'
if facts[:service_provider] == 'systemd'
should contain_systemd__dropin_file('puppetserver.service-limits.conf')
.with_ensure('present')
.with_filename('limits.conf')
Expand All @@ -379,7 +379,7 @@

describe 'with extra_args parameter' do
let(:params) { super().merge(server_jvm_extra_args: ['-XX:foo=bar', '-XX:bar=foo']) }
if facts[:osfamily] == 'FreeBSD'
if facts[:os]['family'] == 'FreeBSD'
it {
should contain_augeas('puppet::server::puppetserver::jvm')
.with_changes(['set puppetserver_java_opts \'"-Xms2G -Xmx2G -XX:foo=bar -XX:bar=foo"\''])
Expand Down Expand Up @@ -410,7 +410,7 @@
end
end

describe 'with cli_args parameter', unless: facts[:osfamily] == 'FreeBSD' do
describe 'with cli_args parameter', unless: facts[:os]['family'] == 'FreeBSD' do
let(:params) { super().merge(server_jvm_cli_args: '-Djava.io.tmpdir=/var/puppettmp') }
if facts[:os]['family'] == 'RedHat'
it {
Expand Down Expand Up @@ -441,7 +441,7 @@

describe 'with jvm_config file parameter' do
let(:params) { super().merge(server_jvm_config: '/etc/custom/puppetserver') }
if facts[:osfamily] == 'FreeBSD'
if facts[:os]['family'] == 'FreeBSD'
it { should contain_augeas('puppet::server::puppetserver::jvm').with_context('/files/etc/rc.conf') }
else
it do
Expand All @@ -454,7 +454,7 @@
end

describe 'gem-path' do
if ['FreeBSD', 'DragonFly'].include?(facts[:osfamily])
if ['FreeBSD', 'DragonFly'].include?(facts[:os]['family'])
it do
should contain_file(puppetserver_conf)
.with_content(%r{^ gem-path: \[\$\{jruby-puppet.gem-home\}, "#{server_vardir}/vendored-jruby-gems", "#{facts[:ruby]['sitedir'].sub(/site_ruby/,'gems')}"\]$})
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

describe 'puppet' do
on_supported_os.each do |os, facts|
context "on #{os}", unless: unsupported_puppetserver_osfamily(facts[:osfamily]) do
if facts[:osfamily] == 'FreeBSD'
context "on #{os}", unless: unsupported_puppetserver_osfamily(facts[:os]['family']) do
if facts[:os]['family'] == 'FreeBSD'
codedir = '/usr/local/etc/puppet'
confdir = '/usr/local/etc/puppet'
etcdir = '/usr/local/etc/puppet'
Expand Down Expand Up @@ -339,7 +339,7 @@
end

it 'should create the puppet user' do
shell = case facts[:osfamily]
shell = case facts[:os]['family']
when /^(FreeBSD|DragonFly)$/
'/usr/local/bin/git-shell'
else
Expand Down Expand Up @@ -484,7 +484,7 @@
)
end

it 'should not sync the crl' do

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on redhat-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on redhat-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on centos-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on oraclelinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on almalinux-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on almalinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on rocky-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on fedora-36-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on debian-11-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on debian-12-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on redhat-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on redhat-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on centos-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on oraclelinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on almalinux-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on almalinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on rocky-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on fedora-36-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on debian-11-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 487 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on debian-12-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]
# https://github.com/puppetlabs/rspec-puppet/issues/37
pending("rspec-puppet always sets $server_facts['servername']")
should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem')
Expand Down
Loading