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

Enabling Travis CI #36

Merged
merged 8 commits into from
Jan 4, 2017
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
20 changes: 6 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,12 @@ script:
matrix:
fast_finish: true
include:
- rvm: 2.4.0-preview3
env: PUPPET_VERSION="~> 4.8" CHECK=spec
- rvm: 2.4.0-preview3
- rvm: 2.4.0
env: PUPPET_VERSION="~> 4.0" CHECK=spec
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.8" CHECK=spec
- rvm: 2.3.1
- rvm: 2.3.3
env: PUPPET_VERSION="~> 4.0" CHECK=spec
- rvm: 2.2.5
env: PUPPET_VERSION="~> 4.8" CHECK=spec
- rvm: 2.2.5
- rvm: 2.2.6
env: PUPPET_VERSION="~> 4.0" CHECK=spec
- rvm: 2.1.9
env: PUPPET_VERSION="~> 4.8" CHECK=spec
- rvm: 2.1.9
env: PUPPET_VERSION="~> 4.0" CHECK=spec
- rvm: 2.1.9
Expand All @@ -41,11 +33,11 @@ matrix:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.8" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=spec
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.6" CHECK=spec
env: PUPPET_VERSION="~> 3.6.0" CHECK=spec
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.6" CHECK=spec
env: PUPPET_VERSION="~> 3.6.0" CHECK=spec
allow_failures:
- rvm: 2.4.0-preview3
- rvm: 2.4.0
notifications:
email: false
#deploy:
Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
class icinga2::config {

if $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name {
fail("icinga2::config is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/feature.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
) {
require ::icinga2::config

if defined($caller_module_name) and $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name and $caller_module_name != '' {
fail("icinga2::feature is a private define resource of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
class icinga2::install {

if $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name {
fail("icinga2::install is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/object.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$order,
) {

if defined($caller_module_name) and $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name and $caller_module_name != '' {
fail("icinga2::object is a private define resource of the module icinga2, you're not permitted to use it.")
}

Expand Down
3 changes: 1 addition & 2 deletions manifests/pki/ca.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
group => $group,
}

if ! $ca_cert or ! $ca_key {
if !$ca_cert or !$ca_key {
exec { 'create-icinga2-ca':
path => $::osfamily ? {
'windows' => 'C:/ProgramFiles/ICINGA2/sbin',
Expand All @@ -59,7 +59,6 @@
notify => Class['::icinga2::service'],
}
} else {

validate_string($ca_cert)
validate_string($ca_key)

Expand Down
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
class icinga2::repo {

if $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name {
fail("icinga2::repo is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
class icinga2::service {

if $module_name != $caller_module_name {
if defined($caller_module_name) and $module_name != $caller_module_name {
fail("icinga2::service is a private class of the module icinga2, you're not permitted to use it.")
}

Expand Down
28 changes: 0 additions & 28 deletions spec/classes/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,6 @@
end


context "#{os} with ca_host => 4247 (not a valid string)" do
let(:params) { {:pki => 'icinga2', :ca_host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with pki => 'icinga2', ca_port => 1234" do
let(:params) { {:pki => 'icinga2',:ca_port => '1234'} }

Expand All @@ -240,13 +233,6 @@
end


context "#{os} with ticket_salt => 4247 (not a valid string)" do
let(:params) { {:ticket_salt => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with endpoints => { foo => {} }" do
let(:params) { {:endpoints => { 'foo' => {}} }}

Expand Down Expand Up @@ -507,13 +493,6 @@
end


context "Windows 2012 R2 with ca_host => 4247 (not a valid string)" do
let(:params) { {:pki => 'icinga2', :ca_host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with pki => 'icinga2', ca_port => 1234" do
let(:params) { {:pki => 'icinga2',:ca_port => '1234'} }

Expand All @@ -529,13 +508,6 @@
end


context "Windows 2012 R2 with ticket_salt => 4247 (not a valid string)" do
let(:params) { {:ticket_salt => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with endpoints => { foo => {} }" do
let(:params) { {:endpoints => { 'foo' => {}} }}

Expand Down
29 changes: 0 additions & 29 deletions spec/classes/ca_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@
it { is_expected.to contain_file(@ca_cert).with_content(/foo/) }
it { is_expected.to contain_file(@ca_key).with_content(/bar/) }
end


context "#{os} with ca_cert => 4247, ca_key => 'bar' (not a valid string)" do
let(:params) { {:ca_cert => 4247, :ca_key => 'bar'} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end

context "#{os} with ca_cert => 'foo', ca_key => 4247 (not a valid string)" do
let(:params) { {:ca_cert => 'foo', :ca_key => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end

end
end

Expand Down Expand Up @@ -81,21 +67,6 @@
it { is_expected.to contain_file(@ca_cert).with_content(/foo/) }
it { is_expected.to contain_file(@ca_key).with_content(/bar/) }
end


context "Windows 2012 R2 with ca_cert => 4247, ca_key => 'bar' (not a valid string)" do
let(:params) { {:ca_cert => 4247, :ca_key => 'bar'} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end

context "Windows 2012 R2 with ca_cert => 'foo', ca_key => 4247 (not a valid string)" do
let(:params) { {:ca_cert => 'foo', :ca_key => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


end


Expand Down
35 changes: 0 additions & 35 deletions spec/classes/gelf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
end


context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }

Expand Down Expand Up @@ -84,13 +77,6 @@
end


context "#{os} with source => 4247 (not a valid string)" do
let(:params) { {:source => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with enable_send_perfdata => true" do
let(:params) { {:enable_send_perfdata => true} }

Expand Down Expand Up @@ -174,13 +160,6 @@
end


context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }

Expand All @@ -199,13 +178,6 @@
end


context "Windows 2012 R2 with source => 4247 (not a valid string)" do
let(:params) { {:source => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context 'Windows 2012 R2 with source => foo' do
let(:params) { {:source => 'foo'} }

Expand All @@ -215,13 +187,6 @@
end


context 'Windows 2012 R2 with source => 4247 (not a valid string)' do
let(:params) { {:source => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with enable_send_perfdata => true" do
let(:params) { {:enable_send_perfdata => true} }

Expand Down
42 changes: 0 additions & 42 deletions spec/classes/graphite_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@
end


context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }

Expand Down Expand Up @@ -87,13 +80,6 @@
end


context "#{os} with host_name_template => 4247 (not a valid string)" do
let(:params) { {:host_name_template => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with service_name_template => foo" do
let(:params) { {:service_name_template => 'foo'} }

Expand All @@ -103,13 +89,6 @@
end


context "#{os} with service_name_template => foo (not a valid string)" do
let(:params) { {:service_name_template => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "#{os} with enable_send_thresholds => true" do
let(:params) { {:enable_send_thresholds => true} }

Expand Down Expand Up @@ -220,13 +199,6 @@
end


context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }

Expand Down Expand Up @@ -261,13 +233,6 @@
end


context "Windows 2012 R2 with host_name_template => foo (not a valid string)" do
let(:params) { {:host_name_template => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with service_name_template => foo" do
let(:params) { {:service_name_template => 'foo'} }

Expand All @@ -277,13 +242,6 @@
end


context "Windows 2012 R2 with service_name_template => foo (not a valid string)" do
let(:params) { {:service_name_template => 4247} }

it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end


context "Windows 2012 R2 with enable_send_thresholds => true" do
let(:params) { {:enable_send_thresholds => true} }

Expand Down
Loading