Skip to content

Commit

Permalink
refs #15217 - puppet 4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam committed Jun 21, 2016
1 parent 509ab8f commit cc387c0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 46 deletions.
21 changes: 20 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,30 @@
# This file is managed centrally by modulesync
# https://github.com/katello/foreman-installer-modulesync
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.5
env:
- PUPPET_VERSION=3.5
- PUPPET_VERSION=3.5 FUTURE_PARSER=yes
- PUPPET_VERSION=4.0
matrix:
fast_finish: true
exclude:
# No support for Ruby 1.9.3 on Puppet 4.x
- rvm: 1.9.3
env: PUPPET_VERSION=4.0
include:
# Only platforms left to support ruby 1.8.7
- rvm: 1.8.7
env: PUPPET_VERSION=3.5
- rvm: 1.8.7
env: PUPPET_VERSION=3.5 FUTURE_PARSER=yes
# Only Puppet 4.x supports Ruby 2.2. Also limit the OS set we test Ruby 2.2 with.
- rvm: 2.2.3
env: PUPPET_VERSION=4.0
# Only Puppet >= 4.4 supports Ruby 2.3. Also limit the OS set we test Ruby 2.3 with.
- rvm: 2.3.0
env: PUPPET_VERSION=4.4
bundler_args: --without development
sudo: false
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 3.2.0 < 4.0.0"
"version_requirement": ">= 3.2.0 < 5.0.0"
}
],
"operatingsystem_support": [
Expand Down
72 changes: 28 additions & 44 deletions spec/classes/capsule_spec.rb
Original file line number Diff line number Diff line change
@@ -1,50 +1,34 @@
require 'spec_helper'

describe 'capsule' do

context 'on redhat' do
let :facts do
{
:concat_basedir => '/tmp',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6',
:operatingsystemmajrelease => '6',
:osfamily => 'RedHat',
}
end

it { should contain_package('katello-debug') }
it { should contain_package('katello-client-bootstrap') }
end

context 'with pulp' do
let :facts do
{
:concat_basedir => '/tmp',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6',
:operatingsystemmajrelease => '6',
:osfamily => 'RedHat',
}
end

let(:params) do
{
:pulp_oauth_secret => 'mysecret',
:qpid_router => false
}
end

let(:pre_condition) do
"class {'foreman_proxy::plugin::pulp': pulpnode_enabled => true}
class {'apache': apache_version => '2.4'}"
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge(:concat_basedir => '/tmp', :mongodb_version => '2.4.14')
end

it { should contain_package('katello-debug') }
it { should contain_package('katello-client-bootstrap') }

context 'with pulp' do
let(:params) do
{
:pulp_oauth_secret => 'mysecret',
:qpid_router => false
}
end

let(:pre_condition) do
"class {'foreman_proxy::plugin::pulp': pulpnode_enabled => true}
class {'apache': apache_version => '2.4'}"
end

it { should contain_class('crane').with( {'key' => '/etc/pki/katello/private/katello-apache.key',
'cert' => '/etc/pki/katello/certs/katello-apache.crt'} ) }

it { should contain_pulp__apache__fragment('gpg_key_proxy').with({
:ssl_content => %r{ProxyPass /katello/api/repositories/}} ) }
end
end

it { should contain_class('crane').with( {'key' => '/etc/pki/katello/private/katello-apache.key',
'cert' => '/etc/pki/katello/certs/katello-apache.crt'} ) }

it { should contain_pulp__apache__fragment('gpg_key_proxy').with({
:ssl_content => %r{ProxyPass /katello/api/repositories/}} ) }
end

end

0 comments on commit cc387c0

Please sign in to comment.