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
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 '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 describe provider_class do
it 'should default to the default setting when no other one is specified' 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 it 'should accept a valid value' do
@liquidio_config[:value] = 'bar' @liquidio_config[:value] = 'bar'
expect(@liquidio_config[:value]).to eq(['bar']) expect(@liquidio_config[:value]).to eq('bar')
end end
it 'should not accept a value with whitespace' do it 'should not accept a value with whitespace' do
@liquidio_config[:value] = 'b ar' @liquidio_config[:value] = 'b ar'
expect(@liquidio_config[:value]).to eq(['b ar']) expect(@liquidio_config[:value]).to eq('b ar')
end end
it 'should accept valid ensure values' do it 'should accept valid ensure values' do