-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Debian 10 support #674
Conversation
since the acceptance tests otherwise take ages, I tested the fix from @ekohl here. |
8f41e47
to
2c93880
Compare
#676 may help to make it easier to manage. |
0765382
to
df40e8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it's fine to treat the major versions as strings and not convert them to integers.
manifests/params.pp
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gemfile
Outdated
@@ -68,4 +71,6 @@ end | |||
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s | |||
gem 'puppet', puppetversion, :require => false, :groups => [:test] | |||
|
|||
gem 'irb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug
Gemfile
Outdated
@@ -68,4 +71,6 @@ end | |||
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s | |||
gem 'puppet', puppetversion, :require => false, :groups => [:test] | |||
|
|||
gem 'irb' | |||
gem 'beaker-vagrant' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in voxpupuli-acceptance
Gemfile
Outdated
@@ -19,6 +19,9 @@ group :test do | |||
gem 'zabbixapi', :require => false | |||
end | |||
|
|||
gem 'rspec-puppet-facts', :git => 'https://github.com/ekohl/rspec-puppet-facts', :branch => 'find-facter-version' | |||
gem 'facterdb', :git => 'https://github.com/camptocamp/facterdb', :branch => 'master' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer not to rely on git branches unless really needed. Perhaps link to the commit/pr that we need to be released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.3.0 was released so this can be removed.
spec/acceptance/agent_spec.rb
Outdated
@@ -11,10 +13,11 @@ def agent_supported(version) | |||
describe "zabbix::agent class with zabbix_version #{version}", if: agent_supported(version) do | |||
it 'works idempotently with no errors' do | |||
pp = <<-EOS | |||
include apt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is including apt needed? It shouldn't be. There's this:
puppet-zabbix/manifests/repo.pp
Lines 98 to 104 in 87e09e3
if ($manage_apt) { | |
# We would like to provide the repos with https urls instead of http | |
# this requires the apt-transport-https package, but we don't want to manage | |
# that package here. That should be handled in a profile :( | |
# somebody should implement https here but make it optional | |
include apt | |
} |
However, there's also https://github.com/puppetlabs/puppetlabs-apt/blob/04b6a898f8e6f733e1b4f62d3c1a1c631b10253c/manifests/source.pp#L71
I don't see why the repo class shouldn't unconditionally include it. It's not a literal class statement so it shouldn't be an issue. However, it defaults to true anyway so this should be redundant.
include apt |
(repeated comment)
@@ -1,7 +1,7 @@ | |||
require 'spec_helper_acceptance' | |||
require 'serverspec_type_zabbixapi' | |||
|
|||
describe 'zabbix_application type' do | |||
describe 'zabbix_application type', unless: default[:platform] =~ %r{debian-10-amd64} do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than skipping, should we just not set the zabbix_version
and use the default in this test suite (repeated in multiple files)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly that won't work. the custom types use the zabbixapi rubygem and that currently only supports older zabbix versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#623 suggests this can work if we update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to get this merged and work on #623 afterwards
2c416ca
to
2a506eb
Compare
@@ -38,7 +38,15 @@ class { 'zabbix': | |||
# setup zabbix. Apache module isn't idempotent and requires a second run | |||
it 'works with no error on the first apply' do | |||
# Cleanup old database | |||
shell('/opt/puppetlabs/bin/puppet resource service zabbix-server ensure=stopped; /opt/puppetlabs/bin/puppet resource package zabbix-server-pgsql ensure=purged; rm -f /etc/zabbix/.*done; su - postgres -c "psql -c \'drop database if exists zabbix_server;\'"') | |||
cleanup_script = <<-SHELL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract this somewhere to avoid the repetition?
eece623
to
d122a27
Compare
a90408a
to
27d1ec0
Compare
@baurmatt any idea how we can get the tests working on CentOS 7 / any idea why they don't fail on master? Somehow the cache is messed up and yum wants to install the 4.4 version of the zabbix server:
|
3fb772d
to
5323faf
Compare
after adding way more yum cleanup statements, it turned green \o/ |
Pull Request (PR) description
This Pull Request (PR) fixes the following issues