-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #29215: Add RHEL 8 to metadata and run tests on all OSes
- Loading branch information
Showing
12 changed files
with
126 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,8 @@ | |
{ | ||
"operatingsystem": "RedHat", | ||
"operatingsystemrelease": [ | ||
"7" | ||
"7", | ||
"8" | ||
] | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::apache' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
|
||
describe "with group overridden" do | ||
let :pre_condition do | ||
"class {'certs': group => 'foreman',}" | ||
end | ||
describe "with group overridden" do | ||
let :pre_condition do | ||
"class {'certs': group => 'foreman',}" | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
it { should compile.with_all_deps } | ||
|
||
it do | ||
is_expected.to contain_certs__keypair('apache') | ||
.with_key_group('foreman') | ||
it do | ||
is_expected.to contain_certs__keypair('apache') | ||
.with_key_group('foreman') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::candlepin' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::foreman_proxy_content' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
let :params do | ||
{ | ||
certs_tar: '/tmp/tar', | ||
foreman_proxy_fqdn: 'bar.example.com' | ||
} | ||
end | ||
describe 'with default parameters' do | ||
let :params do | ||
{ | ||
certs_tar: '/tmp/tar', | ||
foreman_proxy_fqdn: 'bar.example.com' | ||
} | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
end | ||
it { should compile.with_all_deps } | ||
end | ||
|
||
context 'with empty certs_tar' do | ||
let(:params) { { certs_tar: '' } } | ||
context 'with empty certs_tar' do | ||
let(:params) { { certs_tar: '' } } | ||
|
||
it { should compile.and_raise_error(/\'certs_tar\' expects a Stdlib::Absolutepath/) } | ||
it { should compile.and_raise_error(/\'certs_tar\' expects a Stdlib::Absolutepath/) } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::foreman_proxy' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::katello' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
context 'with parameters' do | ||
let :pre_condition do | ||
"class {'certs': pki_dir => '/tmp', server_ca_name => 'server_ca', default_ca_name => 'default_ca'}" | ||
end | ||
context 'with parameters' do | ||
let :pre_condition do | ||
"class {'certs': pki_dir => '/tmp', server_ca_name => 'server_ca', default_ca_name => 'default_ca'}" | ||
end | ||
|
||
it { should contain_trusted_ca__ca('katello_server-host-cert').with_source('/tmp/certs/server_ca.crt') } | ||
it { should contain_trusted_ca__ca('katello_server-host-cert').with_source('/tmp/certs/server_ca.crt') } | ||
|
||
it do | ||
should contain_certs_bootstrap_rpm('katello-ca-consumer-foo.example.com') | ||
.with_dir('/var/www/html/pub') | ||
.with_summary('Subscription-manager consumer certificate for Katello instance foo.example.com') | ||
.with_description('Consumer certificate and post installation script that configures rhsm.') | ||
.with_files(['/usr/bin/katello-rhsm-consumer:755=/var/www/html/pub/katello-rhsm-consumer']) | ||
.with_bootstrap_script('/bin/bash /usr/bin/katello-rhsm-consumer') | ||
.with_postun_script("if [ $1 -eq 0 ]; then\ntest -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf\nfi\n") | ||
.with_alias('katello-ca-consumer-latest.noarch.rpm') | ||
.that_subscribes_to(['Ca[server_ca]', 'Certs::Rhsm_reconfigure_script[/var/www/html/pub/katello-rhsm-consumer]']) | ||
it do | ||
should contain_certs_bootstrap_rpm('katello-ca-consumer-foo.example.com') | ||
.with_dir('/var/www/html/pub') | ||
.with_summary('Subscription-manager consumer certificate for Katello instance foo.example.com') | ||
.with_description('Consumer certificate and post installation script that configures rhsm.') | ||
.with_files(['/usr/bin/katello-rhsm-consumer:755=/var/www/html/pub/katello-rhsm-consumer']) | ||
.with_bootstrap_script('/bin/bash /usr/bin/katello-rhsm-consumer') | ||
.with_postun_script("if [ $1 -eq 0 ]; then\ntest -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf\nfi\n") | ||
.with_alias('katello-ca-consumer-latest.noarch.rpm') | ||
.that_subscribes_to(['Ca[server_ca]', 'Certs::Rhsm_reconfigure_script[/var/www/html/pub/katello-rhsm-consumer]']) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::pulp_client' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::puppet' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs::qpid_router' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}", if: os_facts[:operatingsystemmajrelease] == '7' do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
describe 'with default parameters' do | ||
it { should compile.with_all_deps } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
describe 'certs' do | ||
|
||
context 'on redhat' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let :facts do | ||
os_facts | ||
end | ||
|
||
it { should contain_class('certs::install') } | ||
it { should contain_class('certs::config') } | ||
end | ||
|
||
it { should contain_class('certs::install') } | ||
it { should contain_class('certs::config') } | ||
end | ||
|
||
end |