Commit Graph

20 Commits (08519a992b87f0e5a8fa49ff12db247c6763f61f)

Author SHA1 Message Date
Emilien Macchi a7b78a33e1 Gemfile: rely on puppet-openstack_spec_helper for dependencies
Rely on puppet-openstack_spec_helper gemspec file for managing Gems

Change-Id: I175946e849b144e93597e4f763d9d7330d3db76f
2016-03-29 21:36:10 -04:00
Emilien Macchi 28bcf83e14 drop mock dependency
mock is not used anywhere in the module, let's drop it.
This patch will help to hit this bug:

Change-Id: I427b83d65ac850329e227310a2e3888d5c8c5cd1
2016-01-22 09:39:26 -05:00
Denis Egorenko 258b1905da Use openstack spec helper for spec defaults
* Add puppet-openstack_spec_helper to Gemfile
* Use puppet-openstack_spec_helper/defaults in spec_helper
* Delete spec/defaults.rb, useless now

Change-Id: Ic30d5f0a4e9e4674b378bb74c140dc7b5d81f7b4
2016-01-14 21:04:15 +03:00
Alex Schultz c9f7cbc8b5 Update to pull in rspec-puppet-facts
Change-Id: Ic591dff6d2927a027f29970e6b18020dc589ce7f
2016-01-06 21:28:07 -07:00
Emilien Macchi f55cebf7b6 Try to use zuul-cloner to prepare fixtures
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/ 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: Ibdb2ebccfd782ed5e01b7f0c4bfb6294c89232c6
2015-10-08 14:51:07 -07:00
Cody Herriges 6ea3194989 Initial msync run for all Puppet OpenStack modules
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: I05e2e4c13bd264c65fad8bade1886e23a50184d9
2015-09-04 21:16:12 +00:00
Emilien Macchi 646a6cd15f Use beaker-puppet_install_helper to install puppet
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: I410ebcc23bdc27ae0e632d1f330cab374cbc8912
Co-Authored-By: Colleen Murphy <>
2015-06-30 16:51:46 -04:00
Colleen Murphy 370af254e4 Unpin beaker-rspec
The latest version of beaker tries to manage sshd_config[1] in order to
pass through environment variables. JJB also tries to manage
sshd_config by adding Match blocks to securely allow root SSH[2]. When
beaker tries to append the PermitUserEnvironment line after the Match
blocks, SSH fails to open port 22 and beaker can't SSH in to the
node[3]. This patch unpins beaker-rspec and adds set_env: false to the
nodepool nodesets so that the set_env method is never called and does
not try to mess with the sshd_config.


Change-Id: I9752fd76266fcaf7ad27703799967d5468317781
2015-06-18 10:55:26 -07:00
Emilien Macchi 104829144f Bring Redhat support to acceptance tests
OpenStack Infra has jobs to run this on both Ubuntu Trusty and CentOS7.

* Add minitest to Gemfile (dependency to run beaker on centos - see 11 for details)
* separate nodepool files to have trusty & centos7 support in OS infra
* class_spec: add case for repo configuration and support
  RH systems.
* don't install rabbitmq module that is not used (yet)
* install the apt module explicitly since it's no longer installed
  implicitly by the rabbitmq module

Change-Id: I17a571c8d56d55337ee0c8491fb4aad272074cf6
Closes-bug: #1444736
2015-06-08 13:40:33 -07:00
Emilien Macchi 9f345f97d1 Bump rspec-puppet to 2.1.0
rspec-puppet 2.1.0 includes Puppet 4.0 support [1].


Change-Id: Ie3a5bc3045f2c0367c2bd2799ffe0089b209e731
2015-04-22 23:47:53 -04:00
Emilien Macchi 79d307044a Beaker tests
Implement basic structure for beaker tests.

Change-Id: Ibfe041a7f500502ce357981a7ef917d1ce2a1760
Closes-bug: #1444736
2015-04-20 17:44:38 -04:00
Sebastien Badia dbe297b056 spec: updates for rspec-puppet 2.x and rspec 3.x
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 '' (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)

Change-Id: Ibd0333dc3c0959e846edfbad51fb48e8dfb8fbe9
2015-02-25 05:37:44 +01:00
Sebastien Badia 0d83409381 Fix lint issues (doc, metadata, manifests)
Add puppet parameters lint (with puppet-lint-param-docs gem) and fix
missing documentations, this commit also fix metadata.json file (SPDX
license, and open dependencies).

Change-Id: I0d590b930a8d0263c3a74d861b9786770be7d183
2015-02-23 01:29:11 +01:00
Clayton O'Neill d72e768a10 Add Puppet 4.x lint checks
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: I3d21236d5bf3b0b6c625e38e20492d35aaa13307
2015-02-09 17:02:48 +00:00
Sebastien Badia eed2801f23 spec: pin rspec-puppet to 1.0.1
rspec-puppet (2.0.0) was released yesterday[1], this new version broke
puppet-openstack unit tests (undefined method `resource')[2] as talked on
and in a second time to update your specs to 2.0.0 and rspec 3.x`)

[1] 8459e14807

Change-Id: I7474f99231c8edbafcf4576f78e58506410e7052
Partial-bug: #1417604
2015-02-03 15:32:20 +01:00
Clayton O'Neill 6e38374e16 Normalize Gemfile & pin tests to rspec < 2.99
Pin to rspec < 2.99 until rspec-puppet officially supports rspec 3.x.
This is to avoid warnings due to deprecated matchers in the
rspec-puppet gem.

This change is also intended to normalize the Gemfile for all stackforge
puppet modules.  This should facilitate pinning gem versions when
releasing new stable branches, since the same diff can be used for all

Change-Id: I08dfd8e6a07d60e2421045a0f9d729cc9c26899c
Partial-Bug: #1326034
2014-06-20 09:14:49 -04:00
Chris Hoge a33e9cb82d Fixed gate by Updating Gemfile to pin Rake to 10.1.1
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: Idf75f487cfc20fe2b2af55af59cdeab7c774f62e
2014-03-24 15:31:55 -07:00
Mathieu Gagné bc3893a7a5 Add puppet-lint to Gemfile
Change-Id: I072923b34d22c10f55e126e04eee5fcd48182b39
2013-05-21 19:37:02 -04:00
Mathieu Gagné 44a82aa06a Replace deprecated :rubygems source
Fix deprecation warnings thrown by bundler:

  The source :rubygems is deprecated because HTTP requests are insecure.
  Please change your source to '' if possible,
  or '' if not.

Fixes: bug #1175767
Change-Id: Id577d1d4c057827ce0d53c9bbedc66a8d290f54b
2013-05-02 16:27:19 -04:00
William Van Hevelingen 3edac516ce Add ruby19 and puppet3 to travis matrix 2013-02-09 02:28:49 -08:00