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

refs #15217 - puppet 4 support #87

Merged
merged 1 commit into from
Jun 22, 2016
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
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