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: I227fb1c5203a90d3929d99042e543d3ecc8590ee
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: If05b890b9d1b60a4f0561f35e525259e66895360
In OpenStack Infra, we would like to run Puppet unit tests that
sometimes depends on other Puppet OpenStack modules.
Example: a patch in puppet-openstacklib that needs to be tested in puppet-nova.
This patch modifies the Rakefile to:
* clean spec_prep and spec_clean Rake tasks
* use openstack/puppet-openstack-integration/install_modules_unit.sh script
to clone modules.
* do not use .fixtures.yaml file to clone modules and rely on
zuul-cloner or git.
* Add openstack/ in gitignore so we never commit the
puppet-openstack-integration repository (can happen when spec_clean
did not run but you want to submit the patch anyway)
* Allow to run a custom Puppetfile if PUPPETFILE env is exported. It
will allow people to test the module with the dependencies they like,
feature we had with .fixtures.yaml.
Also add 'r10k' to Gemfile.
That way, we will be able to use zuul dependencies and run tests accross
modules like we do with functional testing.
Change-Id: If983dae0260ea2a1df49b4bdb0ada3c5223012c9
This patch is the initial modulesync run, it impacts:
* 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: Ib75add2af3380d0b1d4ce320b58df22b6c3ffa57
When running with BEAKER_provision=no, the following happens:
In Trusty: beaker is running dpkg with '--force' option so even
if Puppet is already installed, the return code will be 0.
In CentOS: beaker is running 'rpm -ivh' the second time and since
the package is already here, the return code will be 1.
Using the new puppet install helper will abort installing puppet
if BEAKER_provision is no, so tests will continue as normal.
Change-Id: I0a1fb7df6bcc7deb611f37e12ecf8bc2f7a8c9dc
Co-Authored-By: Colleen Murphy <colleen@gazlene.net>
OpenStack Infra has jobs to run this on both Ubuntu Trusty and CentOS7.
* Add minitest to Gemfile (dependency to run beaker on centos - see
http://projects.theforeman.org/issues/2650 for details)
* separate nodepool files to have trusty & centos7 support in OS infra
* basic_keystone_spec: add case for repo configuration and support
RH systems.
* rabbitmq: install module from source
* apt: pin the module
* heat encryption key parameter: use a valid length for the key
Change-Id: If9820a65f1310fe85ff43b32468b746268c04ea0
Closes-bug: #1444736
This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins. Most of these plugins are for 4.x compat, but some
just catch common errors.
Change-Id: If5f03538be85cee4a1d3b4c9a87eae1230432114
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
in order to be prepared for rspec 3.x move.
In details:
* Use shared_examples "a Puppet::Error" for puppet::error tests
* Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
* Fix spec tests for rspec-puppet 2.0.0
* Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
* Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)
* Remove un-used puppet-lint (name_containing_dash config)
Change-Id: I1b82e4f6ec0b1bbf52e86c5d127413a26277ae8c
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
- This puppet-lint plugin checks if all parameters are documented
- Fix some unaligned arrows
- https://github.com/domcleal/puppet-lint-param-docs
Change-Id: I5e73747b726191bc4fc55e6e227892507e185871
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
The latest Rake update requires Ruby >= 1.9. Bundler in the
current gate uses 1.8.x. This update fixes the gate by pinning
Rake to the last known working version.
Change-Id: I8a2c9ff2b33d7fda7818d063fd5a855284aaf089
Fix deprecation warnings thrown by bundler:
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible,
or 'http://rubygems.org' if not.
Change-Id: I63d0497d96a210ac9b6e01a9f0bd4fb4b4f14d9f