Commit Graph

17 Commits

Author SHA1 Message Date
Tobias Urdin 65b0d98cde Use openstack_spec_helper from zuul checkout
Change-Id: I5e7c857c182d0e922f9f9eff4b61258462c86949
2020-08-30 22:56:36 +02:00
ZhongShengping 5dfc798eb8 Move to opendev
Change-Id: Iae4bc60a54e9b4c1a1c87276629496e0b91abc9b
2019-04-21 14:44:48 +08:00
ZhongShengping 31cfd12618 Load puppet-openstack_spec_helper locally during tests
Change-Id: I3d078c19e2e3ce0fd4336296dec7d972886747a4
Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
2018-02-12 10:53:35 +08:00
Alex Schultz dbe0d56392 Update tox configuration
Update the tox configuration to pull in the openstack
upper-constraints.txt when running releasenotes. This will
fix the releasenotes job that is currently failing due to
a new version of sphinx. Additionally this change includes
updates from puppet-modulesync-configs.

Change-Id: I3d920f3ba84f5f15713478ba05517292077dc142
2017-05-17 08:25:02 -06:00
Emilien Macchi f997b6e6a7 Gemfile: rely on puppet-openstack_spec_helper for dependencies
Rely on puppet-openstack_spec_helper gemspec file for managing Gems
dependencies.

Change-Id: I16f80f0e1979f5821d636c7d55d77ec59e8117fc
2016-03-29 21:36:14 -04:00
Denis Egorenko e34e7ef628 Change db-sync command for gnocchi and drop mock
Note: the 3 changes need to be in the same commit because CI is broken at
this time.

Change #1
In Mitaka gnocchi-dbsync was moved to gnocchi-upgrade [1,2].
[1] aee5df615e
[2] https://review.openstack.org/#/c/245069/5/setup.cfg
Partial-bug: #1535382

Change #2
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

Related-Bug: #1492636
Depends-On: I3ac207f744847b5742fc331d2c16d1dad475f9ea
Change-Id: I1e88361018fbbff42cae7e57f2e039fa45eaaeb1
2016-01-27 11:35:47 -05:00
Alex Schultz 60830a46c9 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: I8d270fb1141ee43703c2221651e149ad2ad10066
2016-01-14 20:47:24 +03:00
Emilien Macchi e3c0a7a5da 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/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: I57549c6731e7479da9ac9c1f1dbe37140312f0a8
2015-10-08 14:52:31 -07:00
Cody Herriges 74c4e1d88e 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: I5fb7b79f14f52ff5598920ab8a2411aa02af6f72
2015-08-18 14:51:35 +02:00
Colleen Murphy 2abf60b7e0 Use beaker-puppet_install_helper to install puppet
When running with BEAKER_provision=no, the following happens:
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: I5d70949b29e97688989fddd03c667d601c927811
2015-07-07 13:42:01 -07:00
Sebastien Badia efa68f8d01 acceptance: Added noop acceptance test
gnocchi packaging is not yet ready, thus we cant do functional testing
on this module, but beaker jobs are now voting in the OpenStack CI this
therefore blocks all patches on puppet-gnocchi module.

This patch add a noop acceptance test in order to unlock the CI for
puppet-gnocchi.

This patch also inclued https://review.openstack.org/#/c/195486/

 lint: Fix lint issues (missing documentation for define types)
 The gem 'puppet-lint-param-docs' was bumped to 1.2.0 and now handle
 class and define type. This patch fix lint issues (missing documentation).

Change-Id: I6f46d82c14b950ce511d9000f72eeb3220f782c3
2015-06-25 12:25:12 +02:00
Emilien Macchi 4199d395fd Bump rspec-puppet to 2.1.0
rspec-puppet 2.1.0 includes Puppet 4.0 support [1].

[1] https://github.com/rodjek/rspec-puppet/commits/v2.1.0

Change-Id: I273dd3597a89387c021c7f25601d6d86f55168fa
2015-04-22 23:49:03 -04:00
Sebastien Badia 4438badb14 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: I3a35ddd0e550a307bd1200fc9aa63e156a508f80
2015-03-10 11:38:32 +01:00
Sebastien Badia 82578b3fa3 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 '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)

Change-Id: I30c00e2cb6f92778a0cf0556c861a2f1ee84bbed
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-10 11:30:00 +01:00
Sebastien Badia 3cc4dfeb9a Fix metadata.json lint issues
Update license name to match a valid SPDX ID, and fix open-ended deps.
https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html

Change-Id: Ie092af0842cb888ee35b342365f8a2c57ad12e38
2015-03-10 11:23:47 +01:00
Sebastien Badia c420538d8d spec: lint also parameter documentation 2014-12-29 14:22:07 +01:00
Emilien Macchi 32bfa8be33 First commit with basic structure
* Add fixtures
* Add gitignore
* Add gitreview
* Add Gemfile
* Add LICENSE
* Add README
* Add Rakefile
* Add metadata.json
2014-12-29 13:46:13 +01:00