Browse Source

CentOS 8 support

- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/814234
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-common/+/814235
Change-Id: I4593ffcb9700b232a1879a08e6bbd9cdaf76c222
Signed-off-by: Lance Albertson <lance@osuosl.org>
changes/37/815137/2
Lance Albertson 7 months ago
parent
commit
6d907dedf3
  1. 16
      spec/rabbitmq-server-redhat_spec.rb
  2. 13
      spec/spec_helper.rb

16
spec/rabbitmq-server-redhat_spec.rb

@ -1,15 +1,17 @@
require_relative 'spec_helper'
describe 'openstack-ops-messaging::rabbitmq-server' do
describe 'redhat' do
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
let(:node) { runner.node }
cached(:chef_run) { runner.converge(described_recipe) }
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) }
include_context 'ops_messaging_stubs'
include_context 'ops_messaging_stubs'
it 'does not set use_distro_version to true' do
expect(chef_run.node['rabbitmq']['use_distro_version']).to be_truthy
it 'does not set use_distro_version to true' do
expect(chef_run.node['rabbitmq']['use_distro_version']).to be_truthy
end
end
end
end

13
spec/spec_helper.rb

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

Loading…
Cancel
Save