CentOS 8 support
- Update packages for EL8 - Update ChefSpec Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/814234 Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-database/+/815139 Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-messaging/+/815137 Change-Id: Icf3119067dd4dd45291c0565d97b3fcc89ca3cac Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
86951caf29
commit
f3c371a1bb
|
@ -63,43 +63,63 @@ default['openstack']['integration-test'] = {
|
|||
|
||||
# platform-specific settings
|
||||
case node['platform_family']
|
||||
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
tempest_packages:
|
||||
%w(
|
||||
git
|
||||
curl
|
||||
libxslt-devel
|
||||
libxml2-devel
|
||||
python-testrepository
|
||||
libffi-devel
|
||||
python-devel
|
||||
python-gabbi
|
||||
python-testscenarios
|
||||
python-ddt
|
||||
),
|
||||
package_overrides: '',
|
||||
}
|
||||
when 'rhel'
|
||||
case node['platform_version'].to_i
|
||||
when 8
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
tempest_packages:
|
||||
%w(
|
||||
curl
|
||||
git
|
||||
libffi-devel
|
||||
libxml2-devel
|
||||
libxslt-devel
|
||||
python3-ddt
|
||||
python3-gabbi
|
||||
python3-testrepository
|
||||
python3-testscenarios
|
||||
python36-devel
|
||||
),
|
||||
package_overrides: '',
|
||||
}
|
||||
when 7
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
tempest_packages:
|
||||
%w(
|
||||
curl
|
||||
git
|
||||
libffi-devel
|
||||
libxml2-devel
|
||||
libxslt-devel
|
||||
python-ddt
|
||||
python-devel
|
||||
python-gabbi
|
||||
python-testrepository
|
||||
python-testscenarios
|
||||
),
|
||||
package_overrides: '',
|
||||
}
|
||||
end
|
||||
when 'debian'
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
'tempest_packages' =>
|
||||
%w(
|
||||
git
|
||||
curl
|
||||
libssl-dev
|
||||
git
|
||||
libffi-dev
|
||||
python-dev
|
||||
libffi-dev
|
||||
libpq-dev
|
||||
libssl-dev
|
||||
libxml2-dev
|
||||
libxml2-dev
|
||||
libxslt1-dev
|
||||
libpq-dev
|
||||
libxml2-dev
|
||||
libxslt-dev
|
||||
testrepository
|
||||
python-ddt
|
||||
python-dev
|
||||
python-dev
|
||||
libffi-dev
|
||||
python-gabbi
|
||||
python-testscenarios
|
||||
python-ddt
|
||||
testrepository
|
||||
),
|
||||
'package_overrides' => '',
|
||||
}
|
||||
|
|
|
@ -96,8 +96,10 @@ execute 'create virtualenv for tempest' do
|
|||
creates venv_path
|
||||
end
|
||||
|
||||
# TODO(ramereth): RDO Train ships a cacert.pem which contains the expired LetsEncrypt root cert
|
||||
cookbook_file "#{venv_path}/lib/python2.7/site-packages/pip/_vendor/requests/cacert.pem" if platform_family?('rhel')
|
||||
if platform_family?('rhel') && node['platform_version'].to_i == 7
|
||||
# TODO(ramereth): RDO Train ships a cacert.pem which contains the expired LetsEncrypt root cert
|
||||
cookbook_file "#{venv_path}/lib/python2.7/site-packages/pip/_vendor/requests/cacert.pem"
|
||||
end
|
||||
|
||||
# Note(jh): Make sure to keep the constraint definition in sync with
|
||||
# the tempest version
|
||||
|
|
|
@ -1,72 +1,74 @@
|
|||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-integration-test::dns' do
|
||||
describe 'redhat' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
ALL_RHEL.each do |p|
|
||||
context "redhat #{p[:version]}" do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(p) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
include_context 'tempest-stubs'
|
||||
include_context 'tempest-stubs'
|
||||
|
||||
it do
|
||||
expect(chef_run).to set_resolver_config('/etc/resolv.conf').with(
|
||||
nameservers: %w(1.0.0.1 8.8.8.8)
|
||||
)
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to set_resolver_config('/etc/resolv.conf').with(
|
||||
nameservers: %w(1.0.0.1 8.8.8.8)
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to disable_service('unbound')
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to disable_service('unbound')
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to stop_service('unbound')
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to stop_service('unbound')
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to create_bind_service('default')
|
||||
expect(chef_run).to start_bind_service('default')
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to create_bind_service('default')
|
||||
expect(chef_run).to start_bind_service('default')
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to create_template('/etc/named/rndc.key').with(
|
||||
source: 'rndc.key.erb',
|
||||
owner: 'named',
|
||||
group: 'named',
|
||||
mode: '440',
|
||||
sensitive: true,
|
||||
variables: {
|
||||
secret: 'rndc-key',
|
||||
}
|
||||
)
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to create_template('/etc/named/rndc.key').with(
|
||||
source: 'rndc.key.erb',
|
||||
owner: 'named',
|
||||
group: 'named',
|
||||
mode: '440',
|
||||
sensitive: true,
|
||||
variables: {
|
||||
secret: 'rndc-key',
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run.template('/etc/named/rndc.key')).to notify('bind_service[default]').to(:restart)
|
||||
end
|
||||
it do
|
||||
expect(chef_run.template('/etc/named/rndc.key')).to notify('bind_service[default]').to(:restart)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to create_template('/etc/named/named.designate').with(
|
||||
owner: 'named',
|
||||
group: 'named',
|
||||
variables: {
|
||||
bind_sysconfig: '/etc/named',
|
||||
}
|
||||
)
|
||||
end
|
||||
it do
|
||||
expect(chef_run).to create_template('/etc/named/named.designate').with(
|
||||
owner: 'named',
|
||||
group: 'named',
|
||||
variables: {
|
||||
bind_sysconfig: '/etc/named',
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run.template('/etc/named/named.designate')).to notify('bind_service[default]').to(:restart)
|
||||
end
|
||||
it do
|
||||
expect(chef_run.template('/etc/named/named.designate')).to notify('bind_service[default]').to(:restart)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to create_bind_config('default').with(
|
||||
options: [
|
||||
'allow-new-zones yes',
|
||||
],
|
||||
additional_config_files: %w(named.designate)
|
||||
)
|
||||
it do
|
||||
expect(chef_run).to create_bind_config('default').with(
|
||||
options: [
|
||||
'allow-new-zones yes',
|
||||
],
|
||||
additional_config_files: %w(named.designate)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,17 +1,26 @@
|
|||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-integration-test::setup' do
|
||||
describe 'redhat' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
ALL_RHEL.each do |p|
|
||||
context "redhat #{p[:version]}" do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(p) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
include_context 'tempest-stubs'
|
||||
include_context 'tempest-stubs'
|
||||
|
||||
it 'installs tempest dependencies' do
|
||||
expect(chef_run).to upgrade_package %w(git curl libxslt-devel libxml2-devel python-testrepository libffi-devel python-devel python-gabbi python-testscenarios python-ddt)
|
||||
case p
|
||||
when REDHAT_7
|
||||
it 'installs tempest dependencies' do
|
||||
expect(chef_run).to upgrade_package %w(curl git libffi-devel libxml2-devel libxslt-devel python-ddt python-devel python-gabbi python-testrepository python-testscenarios)
|
||||
end
|
||||
when REDHAT_8
|
||||
it 'installs tempest dependencies' do
|
||||
expect(chef_run).to upgrade_package %w(curl git libffi-devel libxml2-devel libxslt-devel python3-ddt python3-gabbi python3-testrepository python3-testscenarios python36-devel)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ describe 'openstack-integration-test::setup' do
|
|||
}
|
||||
|
||||
it 'installs tempest dependencies' do
|
||||
expect(chef_run).to upgrade_package %w(git curl libssl-dev libffi-dev python-dev libxml2-dev libxslt1-dev libpq-dev libxml2-dev libxslt-dev testrepository python-dev libffi-dev python-gabbi python-testscenarios python-ddt)
|
||||
expect(chef_run).to upgrade_package %w(curl git libffi-dev libffi-dev libpq-dev libssl-dev libxml2-dev libxml2-dev libxslt1-dev libxslt-dev python-ddt python-dev python-dev python-gabbi python-testscenarios testrepository)
|
||||
end
|
||||
|
||||
it 'registers tempest_project1 Project' do
|
||||
|
|
|
@ -8,10 +8,21 @@ RSpec.configure do |config|
|
|||
config.log_level = :warn
|
||||
end
|
||||
|
||||
REDHAT_OPTS = {
|
||||
REDHAT_7 = {
|
||||
platform: 'redhat',
|
||||
version: '7',
|
||||
}.freeze
|
||||
|
||||
REDHAT_8 = {
|
||||
platform: 'redhat',
|
||||
version: '8',
|
||||
}.freeze
|
||||
|
||||
ALL_RHEL = [
|
||||
REDHAT_7,
|
||||
REDHAT_8,
|
||||
].freeze
|
||||
|
||||
UBUNTU_OPTS = {
|
||||
platform: 'ubuntu',
|
||||
version: '18.04',
|
||||
|
|
Loading…
Reference in New Issue