CentOS 8 support

- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/814234
Change-Id: I4593ffcb9700b232a1879a08e6bbd9cdaf76c222
Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
Lance Albertson 2021-10-22 09:53:55 -07:00
parent 8151bc7d69
commit 6f6afd0556
2 changed files with 21 additions and 8 deletions

View File

@ -1,8 +1,9 @@
require_relative 'spec_helper'
describe 'openstack-ops-messaging::rabbitmq-server' do
describe 'redhat' do
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
ALL_RHEL.each do |p|
context "redhat #{p[:version]}" do
let(:runner) { ChefSpec::SoloRunner.new(p) }
let(:node) { runner.node }
cached(:chef_run) { runner.converge(described_recipe) }
@ -13,3 +14,4 @@ describe 'openstack-ops-messaging::rabbitmq-server' do
end
end
end
end

View File

@ -7,10 +7,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',