Skip to content

Commit

Permalink
Merge branch 'api-integration-test-206'
Browse files Browse the repository at this point in the history
  • Loading branch information
bobapple committed Apr 7, 2017
2 parents 07494a9 + 57da0f7 commit d65f44e
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 3 deletions.
2 changes: 1 addition & 1 deletion serverspec/environments/production/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ forge "http://forge.puppetlabs.com"

mod 'puppetlabs/stdlib', :latest
mod 'puppetlabs/concat', :latest
mod 'puppetlabs/apt', '1.8.0'
mod 'puppetlabs/apt', :latest
mod 'puppetlabs/chocolatey', :latest
mod 'puppetlabs/powershell', :latest
mod 'badgerious/windows_env', :latest
Expand Down
32 changes: 30 additions & 2 deletions serverspec/environments/production/manifests/default.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
node /(debian|rhel|ubuntu|sles)/ {
node /(debian|rhel|ubuntu|sles|oracle)/ {
class { '::icinga2':
manage_repo => true,
manage_repo => true,
}

class { '::icinga2::pki::ca': }

class { '::icinga2::feature::api':
pki => 'none',
}

icinga2::object::apiuser { 'icinga':
target => '/etc/icinga2/conf.d/apiuser.conf',
password => 'icinga',
permissions => [ "*" ],
}

package { 'curl': }
}

node /freebsd/ {
class { '::icinga2': }

class { '::icinga2::pki::ca': }

class { '::icinga2::feature::api':
pki => 'none',
}

icinga2::object::apiuser { 'icinga':
target => '/usr/local/etc/icinga2/conf.d/apiuser.conf',
password => 'icinga',
permissions => [ "*" ],
}

package { 'curl': }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
8 changes: 8 additions & 0 deletions serverspec/spec/i2rhel6puppet4/plattform_independent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
8 changes: 8 additions & 0 deletions serverspec/spec/i2rhel7puppet4/plattform_independent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
it { should be_enabled }
it { should be_running }
end

describe port(5665) do
it { should be_listening.with('tcp') }
end

describe command('curl -u icinga:icinga -k https://localhost:5665/v1') do
its(:stdout) { should match(%r{Hello from Icinga 2}) }
end

0 comments on commit d65f44e

Please sign in to comment.