Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Kajinami
235f1064dd Remove usage of deleted manifest_dir
Recent update in rspec-puppet removed some of the config interfaces for
old puppet versions[1]. This drops usage of these interfaces to resolve
the following error in unit tests.

```
An error occurred while loading ./spec/unit/provider/manila_spec.rb.
Failure/Error: c.manifest_dir = File.join(fixture_path, 'manifests')

NoMethodError:
  undefined method `manifest_dir='...
```

[1] 316d95923c

Change-Id: Ide0fcfe683cc5f41c150d3bf8486144152257c8e
2023-10-11 11:53:17 +09:00
Takashi Kajinami
f9bd8755ed Load libraries in a single place
This change refactors how the dependent libraries are loaded during
unit tests, and load the libraries in the base spec_helper to avoid
duplicate and redundant implementations.

Change-Id: I440118c0a63a19cde453c2ba5b73b23604d868cd
2021-12-27 11:58:53 +09:00
Takashi Kajinami
abb7623404 Set fixture paths for unit tests
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: I9342ae7e8945cf8a8d05c0d8d2956191605c7ad8
2021-06-02 13:53:11 +09:00
Alex Schultz
aefbf40c13 Move rspec-puppet-facts to spec helper
This change updates the module to use the rspec-puppet-facts as defined
in the puppet-openstack_spec_helper.

Change-Id: I2d2230f46cd5e7b29a0d1a38303619798f9394ad
2016-09-30 13:16:30 -06:00
Emilien Macchi
aeb040c935 drop mock dependency
mock is not used anywhere in the module, let's drop it.
This patch will help to hit this bug:
https://launchpad.net/bugs/1492636

Change-Id: I000953c7b215454baf9838813c04e94b7ebeca00
2016-01-22 09:31:14 -05:00
Alex Schultz
4e5dc348b4 Add rspec-puppet-facts to the spec_helper
This change adds the rspec-puppet-facts gem to the spec helper so that
we can centralize the management of the base operating systems that we
support. rspec-puppet-facts allows us to simplify our unit tests and
provides a more complete list of Operating Systems and their associated
facts for the unit tests.  With this change we can now loop over and
test CentOS, Debian, Fedora, RedHat, and Ubuntu by simply providing a
list of supported os to rspec-puppet-facts.

Additionally this change includes a central object for managing our
supported os list for rspec-puppet-facts and providing our default facts
like os_service_default. This central object should replace the usage of
@default_facts within the unit tests for each module.

Change-Id: Ie420cd2599fa3e88e6471bf3e9fce20d48f19805
2016-01-14 20:32:37 +03:00
Iury Gregory Melo Ferreira
6156cb49f2 Ceilometer $::os_service_default for db and log
Switch to $::os_service_default all params in logging and db.
Changes: logging.pp, db.pp and tests.

Related-bug: #1515273

Change-Id: I412104bf46c4b40fdbd366e3a8a9dc9de5abb5fd
2015-11-24 18:49:06 +00:00
Sebastien Badia
93575b1639 Initial msync run for all Puppet OpenStack modules
This patch is the initial modulesync run, it impact:

* gitignore: just a sync between projects
* gemfile:
  - update and allow to setup facter version and gem source
  - split beaker gems with a dedicated group
  - switch to rspec-puppet 2.2.0
* rakefile:
  - use the new syntax for lint configuration
  - add a acceptance target
* acceptance:
  - sync nodesets
* spec: added rspec coverage report

Change-Id: I34e999a752667d5f85266bc64059d9740ccbc367
2015-08-06 18:43:19 +00:00
Yanis Guenane
9ec5122f6d Implement rspec function it_raises
On some puppet modules, a it_raises helper is provided. This commit
implements it for puppet-ceilometer.

Change-Id: Ie1c83e09952fed1f114fc07d9944f89e94c413f1
2014-05-15 14:42:34 -04:00
Mathieu Gagné
921cb3e64e Partially add support for RedHat plateform 2013-04-04 19:37:25 -04:00
Mathieu Gagné
49a63ed390 Add rspec tests for ceilometer and ceilometer::api 2013-04-04 17:40:02 -04:00
emilienm
ff053ee175 First Commit 2012-12-07 09:43:55 +01:00