Skip to content

Commit

Permalink
drop support for Debian 10
Browse files Browse the repository at this point in the history
there is already breaking changes on master, so next
releease will be major
  • Loading branch information
TheMeier committed May 26, 2024
1 parent d48bbeb commit e2ab88e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 0 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
]
},
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pkg_cmd = 'dpkg -s nginx | grep ^Maintainer'
pkg_remove_cmd = 'apt-get -y purge nginx nginx-common'
pkg_match = case fact('operatingsystemmajrelease')
when '10', '11'
when '11'
%r{Debian Nginx Maintainers}
when '18.04', '20.04', '22.04'
%r{Ubuntu Developers}
Expand Down
20 changes: 16 additions & 4 deletions spec/acceptance/nginx_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class { 'nginx': }
ensure => present,
www_root => '/var/www/www.puppetlabs.com',
}
host { 'www.puppetlabs.com': ip => '127.0.0.1', }
file_line {'mock hosts':
path => '/etc/hosts',
line => '127.0.0.1 www.puppetlabs.com'
}
file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory }
file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', }
"
Expand Down Expand Up @@ -65,7 +68,10 @@ class { 'nginx': }
ssl_key => '/etc/pki/tls/private/blah.key',
www_root => '/var/www/www.puppetlabs.com',
}
host { 'www.puppetlabs.com': ip => '127.0.0.1', }
file_line {'mock hosts':
path => '/etc/hosts',
line => '127.0.0.1 www.puppetlabs.com'
}
file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory }
file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', }
"
Expand Down Expand Up @@ -131,7 +137,10 @@ class { 'nginx': }
ssl_password_file => '/etc/pki/tls/private/crypted.pass',
www_root => '/var/www/www.puppetlabs.com',
}
host { 'www.puppetlabs.com': ip => '127.0.0.1', }
file_line {'mock hosts':
path => '/etc/hosts',
line => '127.0.0.1 www.puppetlabs.com'
}
file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory }
file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', }
"
Expand Down Expand Up @@ -187,7 +196,10 @@ class { 'nginx': }
ssl => false,
server => ['www.puppetlabs.com'],
}
host { 'www.puppetlabs.com': ip => '127.0.0.1', }
file_line {'mock hosts':
path => '/etc/hosts',
line => '127.0.0.1 www.puppetlabs.com'
}
file { ['/var/www','/var/www/www.puppetlabs.com','/var/www/letsencrypt','/var/www/letsencrypt/.well-known','/var/www/letsencrypt/.well-known/acme-challenge']: ensure => directory }
file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', }
file { '/var/www/letsencrypt/.well-known/acme-challenge/fb9bd98604be3d0c7d589fcc7561cb41': ensure => file, content => 'LetsEncrypt\n', }
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@

it { is_expected.to contain_package('nginx') }

if (facts.dig(:os, 'name') == 'Debian' && %w[10 11].include?(facts.dig(:os, 'release', 'major'))) ||
if (facts.dig(:os, 'name') == 'Debian' && %w[11].include?(facts.dig(:os, 'release', 'major'))) ||
(facts.dig(:os, 'name') == 'Ubuntu' && %w[bionic focal jammy].include?(facts.dig(:os, 'distro', 'codename')))
it { is_expected.to contain_package('libnginx-mod-http-passenger') }
else
Expand Down

0 comments on commit e2ab88e

Please sign in to comment.