Commit Graph

26 Commits

Author SHA1 Message Date
Tobias Urdin
4a5519278a Use openstack_spec_helper from zuul checkout
Change-Id: I0f4e91ffe6f770372cfd03705534d96f1720b311
2020-08-27 11:47:18 +02:00
ZhongShengping
767516c21f Move to opendev
Change-Id: I9001405ec1fb2b5f0c1d0623636ba131d999e4b3
2019-04-21 14:46:50 +08:00
Mohammed Naser
ce0ca3e42b Load puppet-openstack_spec_helper locally during tests
Change-Id: Ibdb5fc5402e9adc6ec585b49d71065b724e39408
2018-02-06 20:32:45 +00:00
Alex Schultz
07f91b1b29 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: I9f880628215d9ab5f1183f96c47142606bada8ce
2017-05-17 08:28:57 -06:00
Emilien Macchi
954984d1fa Gemfile: rely on puppet-openstack_spec_helper for dependencies
Rely on puppet-openstack_spec_helper gemspec file for managing Gems
dependencies.

Change-Id: Ib7fe16dfad7c724a279c139855b36a29a8d12aa8
2016-03-29 21:16:36 -04:00
Emilien Macchi
68421d782b 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: I2e7f4fafded59db7e4810d943f6de68394e9c98e
2016-01-22 09:55:59 -05:00
Denis Egorenko
238d880e9b 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: I8110efa360070060d3321dbf05b69f0756891dcc
2016-01-14 21:01:51 +03:00
Alex Schultz
cdfddf82bc 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: I5e91cec849886e5320e1e2a264af66c5b8bfe95c
2016-01-08 16:02:58 -07:00
Maksym Yatsenko
7e7e848170 Floating IP range support in Nova network
This patch provides a possibility to add
ip ranges of networks (i.e.: 192.168.1.210-192.168.1.224)
to a floating ip pool.

Depends-On: I802280e4e2912c9aed1c10d519ead84b1f22f900

Change-Id: Iffb0af32753708decb8d2b60f1075b66f7520553
2015-11-18 13:35:23 +02:00
Emilien Macchi
91eca792b5 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: Id33c964252cbd1fa1e1b2d06ae946da7fca9bcf5
2015-10-07 12:08:47 -07:00
Cody Herriges
e7444b9a14 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: If5a69a08a8599acb66cf97d2f1d1b1610ea67a82
2015-08-18 14:21:06 +02:00
Emilien Macchi
4a9ee5a19f 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: Ifeb4c3e218b045a462e2969090fbd09a786d6fd1
Co-Authored-By: Colleen Murphy <colleen@gazlene.net>
2015-06-30 16:57:23 -04:00
Colleen Murphy
df40ad7c8d 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.

[1] https://github.com/puppetlabs/beaker/blob/master/lib/beaker/host_prebuilt_steps.rb#L528
[2] http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/puppet-module-jobs.yaml#n42
[3] http://logs.openstack.org/61/185161/1/check/gate-puppet-nova-puppet-beaker-rspec-dsvm-centos7/cd81608/console.html.gz#_2015-05-22_22_05_46_933
[4] https://github.com/puppetlabs/beaker/blob/master/lib/beaker/host_prebuilt_steps.rb#L502

Depends-on: Iefdf96325e11b470e864d5386a3eab0eb655c960
Change-Id: Ic5e44397df5558bb296646b666373ee1dc2343b0
2015-05-26 17:37:31 -07:00
Martin Mágr
1506d64c59 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
  http://projects.theforeman.org/issues/2650 for details)
* separate nodepool files to have trusty & centos7 support in OS infra
* basic_nova_spec: add case for repo configuration and support
  RH systems.

Change-Id: I745fa76b2b36b0dbada83260fedffc4ee60f9c03
Closes-bug: #1444736
2015-05-14 15:05:33 +02:00
Emilien Macchi
e9ef1c3e21 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: I5d7e0e6ceae2478987e075b65535bb01722d525f
2015-04-22 23:54:41 -04:00
Sebastien Badia
b8a187f54c 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
order to be prepared for rspec 3.x move.

In details:

 * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
 * 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
 * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: I172439c6ed185bb38b325b2524cab1475cdc7504
2015-03-19 18:45:08 +01:00
Sebastien Badia
cc70740a31 Add missing puppetdoc and lint all parameter documentation
Un-pin puppet-lint gem and add puppet-lint-param-docs, this commit also
add missing puppetdoc.

Change-Id: Id9843816fc3106f4d2e2052e1cdf4fd18efc194b
2015-03-19 18:42:47 +01:00
Sebastien Badia
ee59a30b29 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: Ifabf9bf78a658f199391ee388da12776376fb868
2015-03-15 22:00:02 +01:00
Clayton O'Neill
00e744a9b1 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: I48838fa11902247101c0473abff65cbb2558f609
2015-02-16 15:58:23 -05:00
Sebastien Badia
ad97aa2372 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
[2] http://logs.openstack.org/45/105245/6/check/gate-puppet-nova-puppet-unit-3.3/3682541/console.html

Change-Id: I6b5ef612b0a0911bb52622c65560afec713d45c0
Partial-bug: #1417604
2015-02-03 15:32:20 +01:00
Spencer Krum
14c16142e0 Initial rspec-beaker testing scaffolding
This allows basic beaker testing to be performed inside
the openstack testing framework.

Change-Id: Iecd247d35c9041ff865544b07811d728c27cf919
2014-11-26 16:27:52 -08:00
Clayton O'Neill
d691bf7e65 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
repos.

Change-Id: I65bade1443395ce99e69c4704d3e1d85e851b9bb
Partial-Bug: #1326034
2014-06-20 09:15:46 -04:00
Chris Hoge
da8f4f63cd 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: I649b58086bd6b3fb01e1717b07f0b0d36040222e
2014-03-24 15:38:14 -07:00
Mathieu Gagné
82586ceaac Add puppet-lint to Gemfile
Change-Id: I4f71109c19a0aade8a8c87c920cb9e934aab34a1
2013-05-08 17:27:36 -04:00
Mathieu Gagné
2feb83d627 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 'https://rubygems.org' if possible,
  or 'http://rubygems.org' if not.

Fixes: bug #1175767
Change-Id: I83082c6ef8d4c8c628bcb812bda2fe3c6dd6cb34
2013-05-02 16:11:11 -04:00
William Van Hevelingen
a475647c10 Add ruby19 and puppet3 to travis matrix 2013-02-09 02:21:29 -08:00