Commit Graph

24 Commits

Author SHA1 Message Date
Tobias Urdin ca95c196cc Use openstack_spec_helper from zuul checkout
Change-Id: I03282e55150b2e2252b61ea043470be501ec2c46
2020-08-30 22:55:50 +02:00
ZhongShengping 84605be4b9 Move to opendev
Change-Id: I5cbf3415d69fb9515f70b5d2007db197d3f21f58
2019-04-21 14:44:48 +08:00
ZhongShengping bd5c1efa05 Load puppet-openstack_spec_helper locally during tests
Change-Id: I85521a15476abb50a3007b241c658e3f278be142
Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
2018-02-12 10:53:35 +08:00
Alex Schultz 1d7f3d7b05 Align Stars, Fix CI
1) 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.

2) beaker: stop deploying glance-registry and glance v1 API

The API and services are deprecated and marked as removed for Pike.

Change-Id: I860ecb2a49fb1feb3a4a24d5ee8271161e4ccc0a
Co-Authored-By: Emilien Macchi <emilien@redhat.com>
2017-05-18 20:15:03 +00:00
Emilien Macchi a7b78a33e1 Gemfile: rely on puppet-openstack_spec_helper for dependencies
Rely on puppet-openstack_spec_helper gemspec file for managing Gems
dependencies.

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:
https://launchpad.net/bugs/1492636

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/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: 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 <colleen@gazlene.net>
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.

[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

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
  http://projects.theforeman.org/issues/2650 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].

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

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 '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: Ibd0333dc3c0959e846edfbad51fb48e8dfb8fbe9
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
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
[2] http://logs.openstack.org/45/105245/6/check/gate-puppet-nova-puppet-unit-3.3/3682541/console.html

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
repos.

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 'https://rubygems.org' if possible,
  or 'http://rubygems.org' 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