Skip to content

Commit

Permalink
test zabbix::server on all supported versions, not only default
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 4, 2023
1 parent f22bc00 commit 0cfff31
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions spec/acceptance/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,57 @@ class { 'postgresql::globals':
it { is_expected.to be_enabled }

Check failure on line 45 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 7

zabbix::server class default parameters Service "zabbix-server" is expected to be enabled Failure/Error: it { is_expected.to be_enabled } expected Service "zabbix-server" to be enabled

Check failure on line 45 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 7

zabbix::server class default parameters Service "zabbix-server" is expected to be enabled Failure/Error: it { is_expected.to be_enabled } expected Service "zabbix-server" to be enabled
end
end

supported_versions.each do |zabbix_version|
# >= 5.2 server packages are not available for RHEL 7
next if zabbix_version >= '5.2' && default[:platform] == 'el-7-x86_64'

context "deploys a zabbix #{zabbix_version} server" do
# Using puppet_apply as a helper
it 'works idempotently with no errors' do

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 7

zabbix::server class deploys a zabbix 5.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'oracle7-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160127825.pp.3pNt6K Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160127825.pp.3pNt6K, line: 9, column: 14) on node oracle7-64-puppet7.example.com

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 7

zabbix::server class deploys a zabbix 5.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'centos7-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160114589.pp.fRMcXX Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160114589.pp.fRMcXX, line: 9, column: 14) on node centos7-64-puppet7.example.com

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 5.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu2004-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160339460.pp.rvxuXt Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160339460.pp.rvxuXt, line: 9, column: 14) on node ubuntu2004-64-puppet7.example.com

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 6.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'ubuntu2004-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160401548.pp.XfVJF7 Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160401548.pp.XfVJF7, line: 9, column: 14) on node ubuntu2004-64-puppet7.example.com

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 5.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'debian11-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160236903.pp.0h5SUB Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160236903.pp.0h5SUB, line: 9, column: 14) on node debian11-64-puppet7.example.com

Check failure on line 55 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 6.0 server works idempotently with no errors Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'debian11-64-puppet7.example.com' exited with 1 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_160254335.pp.xhFmXu Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Info: Loading facts Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Zabbix::Database]: has no parameter named 'zabbix_version' (file: /tmp/apply_manifest_160254335.pp.xhFmXu, line: 9, column: 14) on node debian11-64-puppet7.example.com
# this is a minimal working example if you've a postgres server
# running on another node. multinode testing with beaker is pain,
# so we will deploy multiple services into one box
# pp = <<-EOS
# class { 'zabbix::server':
# manage_database => false,
# }
# EOS

# this will actually deploy apache + postgres + zabbix-server + zabbix-web
pp = <<-EOS
class { 'postgresql::globals':
encoding => 'UTF-8',
locale => 'en_US.UTF-8',
manage_package_repo => $facts['os']['release']['major'] != '8',
manage_dnf_module => $facts['os']['release']['major'] == '8',
version => '12',
}
-> class { 'postgresql::server': }
-> class { 'zabbix::database':
zabbix_version => "#{zabbix_version}"
}
-> class { 'zabbix::server':
zabbix_version => "#{zabbix_version}"
}
EOS

prepare_host

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

# do some basic checks
describe package('zabbix-server-pgsql') do
it { is_expected.to be_installed }

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 7

zabbix::server class deploys a zabbix 5.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 7

zabbix::server class deploys a zabbix 5.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 5.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 6.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 5.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed

Check failure on line 92 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 6.0 server Package "zabbix-server-pgsql" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "zabbix-server-pgsql" to be installed
end

describe service('zabbix-server') do
it { is_expected.to be_running }

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 7

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 7

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Ubuntu 20.04

zabbix::server class deploys a zabbix 6.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running

Check failure on line 96 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - Debian 11

zabbix::server class deploys a zabbix 6.0 server Service "zabbix-server" is expected to be running Failure/Error: it { is_expected.to be_running } expected Service "zabbix-server" to be running
it { is_expected.to be_enabled }

Check failure on line 97 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 7

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be enabled Failure/Error: it { is_expected.to be_enabled } expected Service "zabbix-server" to be enabled

Check failure on line 97 in spec/acceptance/server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 7

zabbix::server class deploys a zabbix 5.0 server Service "zabbix-server" is expected to be enabled Failure/Error: it { is_expected.to be_enabled } expected Service "zabbix-server" to be enabled
end
end
end
end

0 comments on commit 0cfff31

Please sign in to comment.