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.

It also fix proxy/ceilometer rspec syntax for Puppet 3.x. This change
could not be in a separated patchset since it's related to this patch.

Change-Id: I8d20b5297dde8a2ecfcaf3d21d221735bc9df8d6
This commit is contained in:
Emilien Macchi
2015-10-08 14:39:23 -07:00
parent f1f9a24998
commit 68eb6373f0
5 changed files with 67 additions and 16 deletions

View File

@@ -24,7 +24,7 @@ describe 'swift::proxy::ceilometer' do
it { is_expected.to contain_file(fragment_file).with_content(/[filter:ceilometer]/) }
it { is_expected.to contain_file(fragment_file).with_content(/use = egg:ceilometer#swift/) }
if Puppet.version.to_f < 4.0
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[::Ceilometer]')}
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[Ceilometer]')}
else
it { is_expected.to contain_concat__fragment('swift_ceilometer').with_require('Class[Ceilometer]')}
end