summaryrefslogtreecommitdiffstats
path: root/components/congress/puppet/spec/unit/provider/congress_config
diff options
context:
space:
mode:
authorblsaws <bs3131@att.com>2016-05-16 07:40:31 -0700
committerblsaws <bs3131@att.com>2016-05-16 07:40:31 -0700
commit8dcfe1a692815ee3a34dca32fd427471dfd0046a (patch)
tree5619e2c7b7113fe6ec68c98064895f7d8723e5bb /components/congress/puppet/spec/unit/provider/congress_config
parente50f20b9c29fd6282025b4ccb87fedacb013ef66 (diff)
Refactor installer code folders.
JIRA: COPPER-2 Add initial centos7 bash scripts in development. Change-Id: I112aa43c231dac035f0d1bc2ae416fabf6b8b650 Signed-off-by: blsaws <bs3131@att.com>
Diffstat (limited to 'components/congress/puppet/spec/unit/provider/congress_config')
-rw-r--r--components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb68
1 files changed, 0 insertions, 68 deletions
diff --git a/components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb b/components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb
deleted file mode 100644
index 0c4b9fa..0000000
--- a/components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# 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 programatcally 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'
-provider_class = Puppet::Type.type(:congress_config).provider(:ini_setting)
-describe provider_class do
-
- it 'should default to the default setting when no other one is specified' do
- resource = Puppet::Type::congress_config.new(
- {:name => 'DEFAULT/foo', :value => 'bar'}
- )
- provider = provider_class.new(resource)
- expect(provider.section).to eq('DEFAULT')
- expect(provider.setting).to eq('foo')
- end
-
- it 'should allow setting to be set explicitly' do
- resource = Puppet::Type::congress_config.new(
- {:name => 'dude/foo', :value => 'bar'}
- )
- provider = provider_class.new(resource)
- expect(provider.section).to eq('dude')
- expect(provider.setting).to eq('foo')
- end
-
- it 'should ensure absent when <SERVICE DEFAULT> is specified as a value' do
- resource = Puppet::Type::congress_config.new(
- {:name => 'dude/foo', :value => '<SERVICE DEFAULT>'}
- )
- provider = provider_class.new(resource)
- provider.exists?
- expect(resource[:ensure]).to eq :absent
- end
-
- it 'should ensure absent when value matches ensure_absent_val' do
- resource = Puppet::Type::congress_config.new(
- {:name => 'dude/foo', :value => 'foo', :ensure_absent_val => 'foo' }
- )
- provider = provider_class.new(resource)
- provider.exists?
- expect(resource[:ensure]).to eq :absent
- end
-
-end