Bring Redhat support to acceptance tests
OpenStack Infra has jobs to run this on both Ubuntu Trusty and CentOS7. * Add minitest to Gemfile (dependency to run beaker on centos - see http://projects.theforeman.org/issues/2650 for details) * separate nodepool files to have trusty & centos7 support in OS infra * rabbitmq_spec: add support for RH systems. * mysql_spec: removed .my.cnf dependency Change-Id: Ic4864e6e1a23a09057a332b6b6536e4ef4e3af00 Closes-bug: #1444736
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
|
||||
group :development, :test do
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'rspec-puppet', '~> 2.1.0', :require => false
|
||||
gem 'minitest', '~> 4.7', :require => 'minitest/unit'
|
||||
|
||||
gem 'puppet-lint', '~> 1.1.0'
|
||||
gem 'metadata-json-lint'
|
||||
|
@@ -25,7 +25,7 @@ describe 'openstacklib mysql' do
|
||||
it { is_expected.to be_listening.with('tcp') }
|
||||
end
|
||||
|
||||
describe command("mysql --defaults-file=/root/.my.cnf -e 'show databases;' | grep -q beaker") do
|
||||
describe command("mysql -e 'show databases;' | grep -q beaker") do
|
||||
it { should return_exit_status 0 }
|
||||
end
|
||||
|
||||
|
9
spec/acceptance/nodesets/nodepool-centos7.yml
Normal file
9
spec/acceptance/nodesets/nodepool-centos7.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
HOSTS:
|
||||
centos-70-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor : none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
@@ -8,9 +8,29 @@ describe 'openstacklib class' do
|
||||
pp= <<-EOS
|
||||
Exec { logoutput => 'on_failure' }
|
||||
|
||||
if $::osfamily == 'RedHat' {
|
||||
# RabbitMQ is not available in default repo
|
||||
class { '::openstack_extras::repo::redhat::redhat':
|
||||
# Kilo is not GA yet, so let's use the testing repo
|
||||
manage_rdo => false,
|
||||
repo_hash => {
|
||||
'rdo-kilo-testing' => {
|
||||
'baseurl' => 'https://repos.fedorapeople.org/repos/openstack/openstack-kilo/testing/el7/',
|
||||
# packages are not GA so not signed
|
||||
'gpgcheck' => '0',
|
||||
'priority' => 97,
|
||||
},
|
||||
},
|
||||
}
|
||||
$package_provider = 'yum'
|
||||
} else {
|
||||
$package_provider = 'apt'
|
||||
}
|
||||
|
||||
class { '::rabbitmq':
|
||||
delete_guest_user => true,
|
||||
erlang_cookie => 'secrete',
|
||||
package_provider => $package_provider
|
||||
}
|
||||
|
||||
# openstacklib resources
|
||||
|
@@ -32,6 +32,7 @@ RSpec.configure do |c|
|
||||
on host, puppet('module','install','stahnma-epel'), { :acceptable_exit_codes => 0 }
|
||||
# until https://github.com/tamaskozak/puppetlabs-rabbitmq/commit/8bbfe320035fae2ae900211501008d63dc3c171c is part of a release
|
||||
shell('git clone https://github.com/puppetlabs/puppetlabs-rabbitmq /etc/puppet/modules/rabbitmq')
|
||||
shell('git clone https://git.openstack.org/stackforge/puppet-openstack_extras /etc/puppet/modules/openstack_extras')
|
||||
# Install the module being tested
|
||||
puppet_module_install(:source => proj_root, :module_name => 'openstacklib')
|
||||
# List modules installed to help with debugging
|
||||
|
Reference in New Issue
Block a user