This change defines manifest_dir and module_path expicitly in unit
tests so that modules installed under fixtures directory is properly
loaded.
Closes-Bug: #1930403
Change-Id: Ic6af657059b55368897b04e2f537bb0b60298b31
Converts all testing to use rspec-puppet-facts and
removes virtualenv package since that is installed
by the ::python module otherwise it causes a resource
redeclaration.
Change-Id: I651ae89e8f355a6f68b8e3aeb4eef24b36713c2f
Updated to match the changes here:
https://review.openstack.org/#/c/408813/
Also adds basic tests for monasca::agent class
Change-Id: Iec74ba0003a432f2175a745ff88cba2584972604
- Convert 'should' keyword to 'is_expected.to',
- The old ':should' syntax in rspec 3.x is deprecated in favor of ':expect'
syntax,
- Expectations on attribute of subject with 'its'.
Change-Id: Ifba6e1b3e84d29b180954996216c31d4cf4a4509
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
With the creation of the new openstack_config provider, some processing
that was done in monasca_config has been centralized in
openstack_config.
This also applies for agent_config.
Impacted methods are :
* section
* setting
* separator
Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.
The use case is the following :
monasca_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual
monasca_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent
That means that all the current :
if $myvar {
monasca_config { 'DEFAULT/foo' : value => $myvar }
} else {
monasca_config { 'DEFAULT/foo' : ensure => absent }
}
can be removed in favor of :
monasca_config { 'DEFAULT/foo' : value => $myvar }
If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :
monasca_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }
Change-Id: I7b1ced3f5e2d3e9b685a4ae4122f83bea73bc877
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
Created with "puppet module generate <USERNAME>-<MODULE NAME>" command
Gemfile and Rakefile added by hand
Change-Id: I5581abbd8602e0447cd15980fe536856f5508e64