Add back unit tests with Puppet 5 + CentOS 8 Stream

This module still supports Puppet 5. This change adds back unit test
coverage with Puppet 5.

Depends-on: https://review.opendev.org/854061
Change-Id: I757d5c2f1c2af1c548d8ce6fba324c6f42826910
This commit is contained in:
Takashi Kajinami 2022-08-23 14:34:07 +09:00
parent f4ebd36917
commit 4db054a27a
2 changed files with 19 additions and 2 deletions

View File

@ -5,3 +5,18 @@
- puppet-openstack-integration-jobs-scenario001
- puppet-openstack-integration-jobs-scenario004
- release-notes-jobs-python3
check:
jobs:
- puppet-ceph-unit-5.5-centos-8-stream
gate:
jobs:
- puppet-ceph-unit-5.5-centos-8-stream
- job:
name: puppet-ceph-unit-5.5-centos-8-stream
parent: puppet-openstack-unit-base
nodeset: centos-8-stream
# stable/ussuri is the last release with Puppet 5.x support
override-checkout: stable/ussuri
vars:
puppet_gem_version: 5.5.0
rspec_puppet_version: '= 2.9.0'

View File

@ -39,11 +39,13 @@ describe provider_class do
let(:tmpfile) { tmpfilename("ceph_config_test") }
let(:params) { {
:path => tmpfile,
:path => tmpfile,
} }
def validate(expected)
expect(File.read(tmpfile)).to eq(expected)
# NOTE(tkajinam): Remove heading \n to fix an issue with Puppet 5
# + CentOS8 Stream.
expect(File.read(tmpfile).gsub(/^\n/, '')).to eq(expected)
end
it 'should create keys = value and ensure space around equals' do