Merge "Fix wrong file names of some unit test files"

This commit is contained in:
Zuul 2021-01-13 11:56:43 +00:00 committed by Gerrit Code Review
commit 5b239dc588
3 changed files with 30 additions and 8 deletions

View File

@ -1,10 +1,32 @@
require 'puppet'
#
# these tests are a little concerning b/c they are hacking around the
# modulepath, so these tests will not catch issues that may eventually arise
# related to loading these plugins.
# I could not, for the life of me, figure out how to programmatically set the modulepath
$LOAD_PATH.push(
File.join(
File.dirname(__FILE__),
'..',
'..',
'..',
'fixtures',
'modules',
'inifile',
'lib')
)
$LOAD_PATH.push(
File.join(
File.dirname(__FILE__),
'..',
'..',
'..',
'fixtures',
'modules',
'openstacklib',
'lib')
)
require 'spec_helper'
require 'puppet/provider/liquidio/ini_setting'
provider_class = Puppet::Type.type(:liquidio_config).
provider(:ini_setting)
provider_class = Puppet::Type.type(:liquidio_config).provider(:ini_setting)
describe provider_class do
it 'should default to the default setting when no other one is specified' do

View File

@ -29,12 +29,12 @@ describe 'Puppet::Type.type(:liquidio_config)' do
it 'should accept a valid value' do
@liquidio_config[:value] = 'bar'
expect(@liquidio_config[:value]).to eq(['bar'])
expect(@liquidio_config[:value]).to eq('bar')
end
it 'should not accept a value with whitespace' do
@liquidio_config[:value] = 'b ar'
expect(@liquidio_config[:value]).to eq(['b ar'])
expect(@liquidio_config[:value]).to eq('b ar')
end
it 'should accept valid ensure values' do