Skip to content
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

Support Puppet 5 and test it in travis #330

Merged
merged 4 commits into from
Aug 28, 2017
Merged
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
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -13,19 +13,22 @@ before_install:
- bundle -v
script:
- 'bundle exec rake $CHECK'
env:
global:
- PARALLEL_TEST_PROCESSORS=4
matrix:
fast_finish: true
include:
- rvm: 2.4.0
env: PUPPET_VERSION="~> 4.0" CHECK=test
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.3.3
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.1.10
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.1.10
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=4
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.1.10
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test FIXTURES_YML=.fixtures.puppet3.yml
- rvm: 2.1.10
@@ -34,8 +37,6 @@ matrix:
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" CHECK=test FIXTURES_YML=.fixtures.puppet3.yml
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test FIXTURES_YML=.fixtures.puppet3.yml
allow_failures:
- rvm: 2.4.0
branches:
only:
- master
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@
"issues_url": "https://github.com/icinga/puppet-icinga2/issues",
"tags": ["monitoring"],
"requirements": [
{ "name": "puppet", "version_requirement": ">= 3.8.0 < 5.0.0" }
{ "name": "puppet", "version_requirement": ">= 3.8.0 < 6.0.0" }
],
"dependencies": [
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 4.16.0 < 5.0.0" },
{ "name": "puppetlabs/concat", "version_requirement": ">= 2.0.1 < 3.0.0" },
{ "name": "puppetlabs/concat", "version_requirement": ">= 2.0.1 < 5.0.0" },
{ "name": "puppetlabs/apt", "version_requirement": ">= 2.0.0 < 5.0.0" },
{ "name": "puppetlabs/chocolatey", "version_requirement": ">= 0.7.0 < 3.0.0" },
{ "name": "puppet/zypprepo", "version_requirement": ">= 2.0.0 < 3.0.0" }
30 changes: 24 additions & 6 deletions spec/defines/feature_spec.rb
Original file line number Diff line number Diff line change
@@ -2,9 +2,18 @@

describe('icinga2::feature', :type => :define) do
let(:title) { 'bar' }
let(:pre_condition) { [
"class { 'icinga2': features => [], }"
] }
let(:pre_condition) do
[
"class { 'icinga2': features => [], }",
# config file will be created by any feature class
"icinga2::object { 'icinga2::feature::foo':
object_name => 'foo',
object_type => 'FooComponent',
target => '/etc/icinga2/features-available/foo.conf',
order => '10',
}"
]
end


on_supported_os.each do |os, facts|
@@ -66,9 +75,18 @@
C:\ProgramData\chocolatey\bin;',
} }
let(:title) { 'bar' }
let(:pre_condition) { [
"class { 'icinga2': features => [], }"
] }
let(:pre_condition) do
[
"class { 'icinga2': features => [], }",
# config file will be created by any feature class
"icinga2::object { 'icinga2::feature::foo':
object_name => 'foo',
object_type => 'FooComponent',
target => 'C:/ProgramData/icinga2/etc/icinga2/features-available/foo.conf',
order => '10',
}"
]
end

context 'Windows 2012 R2 with ensure => present, feature => foo' do
let(:params) { {:ensure => 'present', 'feature' => 'foo'} }