]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Try to use zuul-cloner to prepare fixtures 64/14664/1
authorEmilien Macchi <emilien@redhat.com>
Thu, 8 Oct 2015 21:37:08 +0000 (14:37 -0700)
committeriberezovskiy <iberezovskiy@mirantis.com>
Mon, 14 Dec 2015 15:12:47 +0000 (18:12 +0300)
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: I8b884ef477bbc031da6bd3955ed308679e0380f6

release: prepare 7.0.0 (liberty)

This patch prepares this Puppet module to be released in 7.x series (Liberty)
with 7.0.0.

Change-Id: I4d892d41a8d7c8ed1f1a00712afced944c821f92

Update rspec tests for keystone

https://review.openstack.org/#/c/228744/ has been merged, we need to
drop the 'tenant' parameter to Keystone_user resource.

Change-Id: I515769d73b26b21b2a18914411a9d9aee27f95c9

.fixtures.yml [deleted file]
.gitignore
CHANGELOG.md
Gemfile
README.md
Rakefile
metadata.json
spec/classes/ceilometer_keystone_auth_spec.rb
spec/spec_helper_acceptance.rb

diff --git a/.fixtures.yml b/.fixtures.yml
deleted file mode 100644 (file)
index 7f0c8e3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-fixtures:
-  repositories:
-    'apache': 'git://github.com/puppetlabs/puppetlabs-apache.git'
-    'concat':
-      'repo': 'git://github.com/puppetlabs/puppetlabs-concat.git'
-      'ref': '1.2.1'
-    'inifile': 'git://github.com/puppetlabs/puppetlabs-inifile'
-    'keystone': 'git://github.com/openstack/puppet-keystone.git'
-    'mysql': 'git://github.com/puppetlabs/puppetlabs-mysql.git'
-    'nova': 'git://github.com/openstack/puppet-nova.git'
-    'openstacklib': 'git://github.com/openstack/puppet-openstacklib.git'
-    'postgresql': 'git://github.com/puppetlabs/puppet-postgresql.git'
-    'stdlib': 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
-  symlinks:
-    'ceilometer': "#{source_dir}"
index 4dd84f06ec9a051c3106fd5a438739da79e1f0d2..15c55efd0ee00914fd8420076cc1b40d815d505d 100644 (file)
@@ -8,3 +8,4 @@ coverage/
 .idea/
 *.swp
 *.iml
+openstack/
index e29904bed3591d09d77f8ef0d725b9482fd12411..3bd9edc8531b3cda2e0f34fb108cc9c3cae5c67a 100644 (file)
@@ -1,3 +1,61 @@
+##2015-11-25 - 7.0.0
+###Summary
+
+This is a backwards-incompatible major release for OpenStack Liberty.
+
+####Backwards-incompatible changes
+- change section name for AMQP qpid parameters
+- remove deprecated mysql_module
+
+####Features
+- keystone/auth: make service description configurable
+- add support for RabbitMQ connection heartbeat
+- simplify parameters for rpc_backend
+- add tag to package and service resources
+- enable support for memcached_servers
+- add ability to specify ttl and timeout parameters
+- add ability to manage use_stderr parameter
+- creation of ceilometer::db::sync
+- reflect provider change in puppet-openstacklib
+- make 'alarm_history_time_to_live' parameter configurable
+- update ceilometer::db class to match other module pattern
+- implement auth_endpoint_type parameter
+- stop managing File resources
+- put all the logging related parameters to the logging class
+- add mongodb_replica_set option
+- allow customization of db sync command line
+
+####Bugfixes
+- rely on autorequire for config resource ordering
+- compute agent: do not try to configure nova.conf
+- agent/auth: bring consistent how we manage empty parameters
+- remove the api service subscription on db sync
+- wsgi: make sure eventlet process is stopped before httpd
+- auth: drop service dependency for Keystone_user_role
+
+####Maintenance
+- fix rspec 3.x syntax
+- initial msync run for all Puppet OpenStack modules
+- acceptance: enable debug & verbosity for OpenStack logs
+- acceptance/eventlet: make sure apache is stopped
+- acceptance: use common bits from puppet-openstack-integration
+- rspec: run tests for ::ceilometer::agent::auth
+- try to use zuul-cloner to prepare fixtures
+- spec: Enable webmock connect to IPv4 link-local
+- db: Use postgresql lib class for psycopg package
+- remove class_parameter_defaults puppet-lint check
+
+##2015-10-10 - 6.1.0
+###Summary
+
+This is a feature and bugfix release in the Kilo series.
+
+####Bugfixes
+- WSGI: make it work, and test it with acceptance
+
+####Maintenance
+- acceptance: checkout stable/kilo puppet modules
+
 ##2015-07-08 - 6.0.0
 ###Summary
 
diff --git a/Gemfile b/Gemfile
index 6d4ce9a07b2716a5120e66b7b37b044edde15aa0..fc22143982eeb61f0b2552d71d47045134f3e296 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -19,6 +19,7 @@ end
 group :system_tests do
   gem 'beaker-rspec',                 :require => 'false'
   gem 'beaker-puppet_install_helper', :require => 'false'
+  gem 'r10k',                         :require => 'false'
 end
 
 if facterversion = ENV['FACTER_GEM_VERSION']
index f94759b8a8dbbe6e318c6557f37f39481aa1da4c..b9cf4b29851e579eba143aecb05e7cb433859c4a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 Ceilometer
 ==========
 
-6.0.0 - 2015.1 - Kilo
+7.0.0 - 2015.2 - Liberty
 
 #### Table of Contents
 
index bc08f437ca1fac3f6b618b819a63c1c07a7dd83d..3049244df763ebeb41ca0f5815bd52332ecc3002 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,9 @@
 require 'puppetlabs_spec_helper/rake_tasks'
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
+require 'json'
+
+modname = JSON.parse(open('metadata.json').read)['name'].split('-')[1]
 
 PuppetSyntax.exclude_paths ||= []
 PuppetSyntax.exclude_paths << "spec/fixtures/**/*"
@@ -19,3 +22,64 @@ desc "Run acceptance tests"
 RSpec::Core::RakeTask.new(:acceptance) do |t|
   t.pattern = 'spec/acceptance'
 end
+
+Rake::Task[:spec_prep].clear
+desc 'Create the fixtures directory'
+task :spec_prep do
+  # Allow to test the module with custom dependencies
+  # like you could do with .fixtures file
+  if ENV['PUPPETFILE']
+    puppetfile = ENV['PUPPETFILE']
+    if ENV['GEM_HOME']
+      gem_home    = ENV['GEM_HOME']
+      gem_bin_dir = "#{gem_home}" + '/bin/'
+    else
+      gem_bin_dir = ''
+    end
+    r10k = ['env']
+    r10k += ["PUPPETFILE=#{puppetfile}"]
+    r10k += ["PUPPETFILE_DIR=#{Dir.pwd}/spec/fixtures/modules"]
+    r10k += ["#{gem_bin_dir}r10k"]
+    r10k += ['puppetfile', 'install', '-v']
+    sh(*r10k)
+  else
+  # otherwise, use official OpenStack Puppetfile
+    zuul_ref = ENV['ZUUL_REF']
+    zuul_branch = ENV['ZUUL_BRANCH']
+    zuul_url = ENV['ZUUL_URL']
+    repo = 'openstack/puppet-openstack-integration'
+    rm_rf(repo)
+    if File.exists?('/usr/zuul-env/bin/zuul-cloner')
+      zuul_clone_cmd = ['/usr/zuul-env/bin/zuul-cloner']
+      zuul_clone_cmd += ['--cache-dir', '/opt/git']
+      zuul_clone_cmd += ['--zuul-ref', "#{zuul_ref}"]
+      zuul_clone_cmd += ['--zuul-branch', "#{zuul_branch}"]
+      zuul_clone_cmd += ['--zuul-url', "#{zuul_url}"]
+      zuul_clone_cmd += ['git://git.openstack.org', "#{repo}"]
+      sh(*zuul_clone_cmd)
+    else
+      sh("git clone https://git.openstack.org/#{repo} -b stable/liberty #{repo}")
+    end
+    script = ['env']
+    script += ["PUPPETFILE_DIR=#{Dir.pwd}/spec/fixtures/modules"]
+    script += ["ZUUL_REF=#{zuul_ref}"]
+    script += ["ZUUL_BRANCH=#{zuul_branch}"]
+    script += ["ZUUL_URL=#{zuul_url}"]
+    script += ['bash', "#{repo}/install_modules_unit.sh"]
+    sh(*script)
+  end
+  rm_rf("spec/fixtures/modules/#{modname}")
+  ln_s(Dir.pwd, "spec/fixtures/modules/#{modname}")
+  mkdir_p('spec/fixtures/manifests')
+  touch('spec/fixtures/manifests/site.pp')
+end
+
+Rake::Task[:spec_clean].clear
+desc 'Clean up the fixtures directory'
+task :spec_clean do
+  rm_rf('spec/fixtures/modules')
+  rm_rf('openstack')
+  if File.zero?('spec/fixtures/manifests/site.pp')
+    rm_f('spec/fixtures/manifests/site.pp')
+  end
+end
index c7d82fc992684e7623474e7ad67122f2e2561bf0..c7fc20a4b9b379b4d70593db4d1c6558e2723643 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "openstack-ceilometer",
-  "version": "6.0.0",
+  "version": "7.0.0",
   "author": "eNovance and OpenStack Contributors",
   "summary": "Puppet module for OpenStack Ceilometer",
   "license": "Apache-2.0",
@@ -33,8 +33,8 @@
   "dependencies": [
     { "name": "puppetlabs/apache", "version_requirement": ">=1.0.0 <2.0.0" },
     { "name": "puppetlabs/inifile", "version_requirement": ">=1.0.0 <2.0.0" },
-    { "name": "openstack/keystone", "version_requirement": ">=6.0.0 <7.0.0" },
+    { "name": "openstack/keystone", "version_requirement": ">=7.0.0 <8.0.0" },
     { "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0 <5.0.0" },
-    { "name": "openstack/openstacklib", "version_requirement": ">=6.0.0 <7.0.0" }
+    { "name": "openstack/openstacklib", "version_requirement": ">=7.0.0 <8.0.0" }
   ]
 }
index a0302db78408403d305344949472182fa03c2098..649b55a24befb39026f4f5fc726aa24f3a165ac2 100644 (file)
@@ -32,7 +32,6 @@ describe 'ceilometer::keystone::auth' do
           :ensure   => 'present',
           :password => params[:password],
           :email    => default_params[:email],
-          :tenant   => default_params[:tenant]
         )
       end
 
@@ -80,7 +79,6 @@ describe 'ceilometer::keystone::auth' do
           :ensure   => 'present',
           :password => params[:password],
           :email    => params[:email],
-          :tenant   => params[:tenant]
         )
       end
 
index 429e807c4282ee1d558caaab53feb75fc10ad492..15e8cc977087c9a60dd699e6045f717587e0cdc7 100644 (file)
@@ -38,7 +38,7 @@ RSpec.configure do |c|
         zuul_clone_cmd += "git://git.openstack.org #{repo}"
         on host, zuul_clone_cmd
       else
-        on host, "git clone https://git.openstack.org/#{repo} #{repo}"
+        on host, "git clone https://git.openstack.org/#{repo} -b stable/liberty #{repo}"
       end
 
       on host, "ZUUL_REF=#{zuul_ref} ZUUL_BRANCH=#{zuul_branch} ZUUL_URL=#{zuul_url} bash #{repo}/install_modules.sh"