Commit Graph

10 Commits

Author SHA1 Message Date
Takashi Kajinami bbcac63121 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: I31735e0aef3ac6a06b80d404829e960911f18297
2023-10-11 11:58:06 +09:00
Takashi Kajinami 341f6cf55e 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: Id967a66f12a08da1e3ded2195cf7c3a711331347
2021-12-27 10:33:04 +09:00
Takashi Kajinami 8fe9a66e28 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: Ibf9d7008b985a84d2edbaf072c9fce2fab448bc8
2021-06-02 13:56:18 +09:00
Alex Schultz 4e47963991 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: Ia088dc7def74ce140fe14e627f51432e75a966b2
2016-09-30 13:17:49 -06:00
Alex Schultz 736590636c Update define tests to use rspec-puppet-facts
This change updates the designate resource rspec tests to properly
leverage rspec-puppet-facts.  With this change, all the rspec tests for
designate will be using rspec-puppet-facts.

Change-Id: I97cd758e6c754b1f40f2b120e870e2fece1401b2
2016-09-27 16:08:13 -06:00
Emilien Macchi ec9f7d095e 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: I067f8c327635880c0fe46fc66c4c515f99070ff0
2016-01-22 09:34:03 -05:00
Alex Schultz a337e0188d 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: I2c34915be8cdb376d1120cc70f1d12454561f0af
2016-01-14 21:21:14 +03:00
Cody Herriges 9948a9b252 Initial msync run for all Puppet OpenStack modules
This patch is the initial modulesync run, its 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: If1902135ecb45e84d25d5b6ddd5698dd98c87646
2015-08-06 20:41:13 +02:00
Sebastien Badia 343b049414 spec: Added designate::* unit tests
Change-Id: I01410468db17e84db0667ca4db4a58d0f108d8cc
2014-11-24 19:43:33 +01:00
Xingchao Yu 9b9d9a205e Add fixtures.yml and mysql db spec test 2013-10-18 16:21:28 +08:00