Commit Graph

19 Commits

Author SHA1 Message Date
Tobias Urdin 03784ddd87 Use openstack_spec_helper from zuul checkout
Change-Id: Id497fdbe858eca6cd6e3e702af726db8c41dde9a
2020-08-30 22:53:44 +02:00
ZhongShengping da5321f541 Move to opendev
Change-Id: I3fcf0bc4004c605dd4504c4840b91454a6261a15
2019-04-21 14:44:48 +08:00
ZhongShengping beb527799a Load puppet-openstack_spec_helper locally during tests
Change-Id: Id8b37831c20123dcd69ce672dadc48c00a2e0524
Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
2018-02-12 10:53:34 +08:00
Giulio Fidente 0ff9c53a2c 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: I1430a2502ecc877bd38cd741510958a026cba628
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2017-05-18 18:06:56 +02:00
Emilien Macchi fb88544ab5 Re-boostrap beaker tests
Current puppet-ceph CI is broken for all functional jobs.
I would like to restart from scratch the way we test the module.

1) centos7: deploy Jewel using buildlogs.centos.org repo
CentOS SIG does not provide packaging to deploy the Jewel repository,
let's install it by hand.

2) Remove RGW tests for now. We'll re-add them later, in a
puppet-openstack-integration scenario.

3) Reset spec files to match with other Puppet OpenStack modules.

4) On CentOS, use systemd resource and not sysvinit.

5) Fix keyring idempotency with SElinux.

Change-Id: Ie9ba521cdb4ac6823746d37bb5d1697e274e4119
2016-07-07 16:27:14 -04:00
Emilien Macchi e26cb47661 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: I9513090167febbb5f826a3f2a9d628842086adc0
2016-01-22 09:31:57 -05:00
Gael Chamoulaud 71fccdf944 Add EL7 Support, Fix unit and integration tests
This commit is a merge of two patchsets that adds
support for EL7 and fixes unit and integration tests.
They are required to be in the same patchset in order
for all tests to pass.
---
Make puppet-ceph unit tests compliant with Puppet4

- Bump rspec-puppet to 2.1.0 includine Puppet 4.0 support [1].
- Bump puppetlabs-apache to 1.4.1
- Bump puppetlabs-concat to 1.2.1
- Fix puppet lint issue with missing doc
- Fix dependency version acceptance tests
- Drop firefly from the ::ceph::rgw::apache tests as it seems buggy.
- Fix acceptance tests. Beaker acceptance test have been enabled for trusty
  and centos recently. This module does not yet support them so currently
  jenkins tests always fail.

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

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit ca86aafb05)
---
Add EL7 support

If Fedora is 20 or more, CentOS / Red Hat 7, we want to install EPEL7.
Otherwise, we want to setup EPEL6 for backward compatibility with Fedora
19 and before, and CentOS / Red Hat 6.X and before.

Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Co-Authored-By: David Gurtner <aldavud@crimson.ch>
Co-Authored-By: Gael Chamoulaud <gchamoul@redhat.com>
Co-Authored-By: Andrew Woodward <xarses@gmail.com>
Co-Authored-By: Florian Haas <florian@hastexo.com>
Co-Authored-By: Jan Kundrat <jkt@kde.org>
Co-Authored-By: Aimon Bustardo <me@aimon.net>
(cherry picked from commit 009d222911)

Closes-bug: #1422516
Closes-bug: #1392002
Change-Id: I4af127715260b7999dcc7c3e0079ffaf28439c1e
2015-06-30 16:29:26 -04:00
Sebastien Badia 6fd0f87f04 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: If9f969703d99f3a45fd1822208a2b1342f13e49a
2015-02-28 22:18:53 +00:00
Sebastien Badia 94c8f1edfc Add puppet metadata.json lint
This commit adds the rake task `metadata_lint` for checks and lint
of puppet metadata.json file.

Change-Id: I68cb07dc8a7719325634a0c57fcb649f5379aec6
2015-02-28 22:10:53 +00:00
Sebastien Badia cf6478490e 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 new
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:

  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * 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: I512ffe4ac12763ec5a4bea935001088bad231cc1
2015-02-27 13:41:44 +00:00
Sebastien Badia 63cbbda8f2 Check and lint documentation parameters
This puppet-lint plugin checks if all parameters are documented. This commit
also fix lint issues (due to puppet-lint upgrade) and puppet strings errors.

Change-Id: If2e2be0e0c28649b0293f2988faf59b2a0e73437
2015-02-27 00:45:37 +01:00
David Gurtner e998f5dd28 Adding base infrastructure for beaker CI tests
Change-Id: Iad5984bd9eab24d2ff589fd6d70b3ed46bab56ec
2015-02-03 23:47:47 +01:00
Sebastien Badia 22d30ee370 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: I2d15fc06506a3e8364c00de4660ea2d2f76def55
Partial-bug: #1417604
2015-02-03 15:32:20 +01:00
Clayton O'Neill 73114e00dd 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: Ie36f3537c46a86e6d3d00ebd9abf62b44dbe0540
Partial-Bug: #1326034
2014-06-20 09:13:50 -04:00
Loic Dachary 17ce646164 remove rspec-system dependencies from Gemfile
rspec-system will fail to install on jenkins slaves. It does not matter
anyway since it is not going to be used for unit tests. Create a
Gemfile-rspec-system to be used when running integration tests. Although
it would be convenient to be able to

   BUNDLE_GEMFILE=Gemfile-rspec-system bundle exec rake spec:system

it will fail because the environment variable won't be propagated where
it should.

   .rspec_system/vagrant_projects/x64/Gemfile-rspec-system not found

The README.md file is updated to simply mv to Gemfile which is good
enough for the environment running the integration tests.

A bug was filed against openstack-ci to resolve this installation
problem but it is unclear if and how it could be fixed
https://bugs.launchpad.net/openstack-ci/+bug/1290710

Change-Id: I0bff624892837536419bdbdd6651b009600fe9c6
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-11 08:54:54 +01:00
Loic Dachary 13522e16e2 attach disks when running integration tests
The vagrant instances run for integration tests are attached a 10GB thin
provisioned disk. It will show on /dev/sdb an allow for tests when
creating an OSD on a physical device.

This feature has been added to a fork of rspec-system (
6b1860fc5a
) which is hosted on gitorious instead of github. There is no hope of
getting the patch accepted because rspec-system is retired.

The test instances are renamed (first.vm => first, second.vm => second)
without a dot in their name because it makes it easier to derive a disk
name that does not conflict with the restrictions imposed by vagrant on
disk file names.

Change-Id: I1964c7f6160bd16b92a7e4fd6dc9444c22cfd60b
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-26 08:21:08 +00:00
Loic Dachary 66d91a3d19 ceph::mon create or destroy monitors
* ceph::mon resource

  create a MON if ensure == present or destroy one if absent

  all combinations of keys / keyring as specified in the blueprint are
  supported

* integration tests cover all cases and unit tests are implemented to
  ensure syntax correctness

* minor corrections to other classes are included ( two nodes for
  integration tests, default values for the ceph class etc. )

* A ceph::mons class wrapper is created for compatibility with
  scenario_node_terminus

Closes-Bug: #1251443

Change-Id: Ic56a4124738006f7946ee9c166295f7048cb7854
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-18 22:18:31 +01:00
Loic Dachary 7557d5e8ee integration tests environment
Use https://github.com/puppetlabs/rspec-system-puppet to implement
vagrant based integration tests. The README.md is updated with
instructions to run the integration tests locally. These tests could be
run by a deamon listening to the gerrit stream, when a changeset is
submitted for review, to prove that they do not introduce a regression.

The dependencies from .fixtures.yml have been manually replicated to
spec/spec_helper_system.rb . rspec system puppet is still young and
people do this. It will be a burden only for long term maintenance. And
when it does, in a few months from now, it is safe to assume that rspec
system puppet will have support for reading from an existing file. The
alternative is that rspec system puppet is obsoleted / dead, in which
case this is even a bigger problem. In any case, if work had to be done
to fix this, it should be a patch against rspec system puppet and not
part of puppet-ceph.
https://github.com/puppetlabs/rspec-system-puppet/issues/5

A test for the ceph::repo class is included to demonstrate the
environment actually works. It is not meant to fully test the ceph::repo
integration this would require a separate patch. rspec-system-puppet
requires at least one file in spec/system otherwise it will fail with
an unrelated error:

   Could not autoload puppet/provider/ceph_config/ini_setting: undefined
   method `provider' for nil:NilClass (Puppet::Error)

This test can be removed as soon as another is added.

Change-Id: Ib65120a58ce203126be5897f602e280c474642dc
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-10-27 13:44:11 +01:00
Dan 2183e90cd6 Add project files
This commit adds the initial project files.

Change-Id: If26c9a8d19e26181d568d615dc71bb4721fc4aa1
2013-10-20 22:45:54 -07:00