From ae3c6a862f365b20ba84384167cc7037472b92d8 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Tue, 29 Jul 2014 11:51:48 -0500 Subject: [PATCH] Setting up repo for master Juno branch * Update metadata versions * Updates for icehouse specific attributes * Removing Strainer file * Updating Gems * chef (11.12.0) * chefspec (4.0.0) * rspec (3.0.0) * Cleanup specs for 4.x Change-Id: Ibb18b6a2a523c123ffd96f14cc81d958a308b313 Partial-Bug: 1349865 --- .gitignore | 1 + CHANGELOG.md | 3 +++ Gemfile | 7 +++---- README.md | 2 +- Strainerfile | 5 ----- metadata.rb | 4 ++-- spec/rabbitmq-server-redhat_spec.rb | 2 +- spec/rabbitmq-server_spec.rb | 4 ++-- spec/spec_helper.rb | 10 +++++----- 9 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 Strainerfile diff --git a/.gitignore b/.gitignore index be9fe71..86d8373 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ .coverage/ *.swp Berksfile.lock +Gemfile.lock Vagrantfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c52db9..07bfd80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ This file is used to list changes made in each version of cookbook-openstack-ops-messaging. +## 10.0.0 +* Upgrading to Juno + ## 9.0.1 ### Bug * Fix the depends cookbook version issue in metadata.rb diff --git a/Gemfile b/Gemfile index 998a645..ac66595 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,11 @@ # encoding: UTF-8 source 'https://rubygems.org' -gem 'chef', '~> 11.8' +gem 'chef', '~> 11.12.0' gem 'json', '<= 1.7.7' # chef 11 dependency gem 'berkshelf', '~> 2.0.18' gem 'hashie', '~> 2.0' -gem 'chefspec', '~> 3.4.0' -gem 'rspec', '~> 2.14.1' +gem 'chefspec', '~> 4.0.0' +gem 'rspec', '~> 3.0.0' gem 'foodcritic', '~> 3.0.3' -gem 'strainer' gem 'rubocop', '~> 0.18.1' diff --git a/README.md b/README.md index 109e617..fd6e833 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Description # -This cookbook provides shared message queue configuration for the OpenStack **Icehouse** reference deployment provided by Chef for OpenStack. The http://github.com/mattray/chef-openstack-repo contains documentation for using this cookbook in the context of a full OpenStack deployment. It currently supports RabbitMQ and will soon other queues. +This cookbook provides shared message queue configuration for the OpenStack deployment provided by Chef for OpenStack. The http://github.com/mattray/chef-openstack-repo contains documentation for using this cookbook in the context of a full OpenStack deployment. It currently supports RabbitMQ and will soon other queues. # Requirements # diff --git a/Strainerfile b/Strainerfile deleted file mode 100644 index 7402231..0000000 --- a/Strainerfile +++ /dev/null @@ -1,5 +0,0 @@ -# Strainerfile -rubocop: rubocop $SANDBOX/$COOKBOOK -knife test: knife cookbook test $COOKBOOK -foodcritic: foodcritic -f any -t ~FC003 $SANDBOX/$COOKBOOK -chefspec: rspec --format documentation $SANDBOX/$COOKBOOK/spec diff --git a/metadata.rb b/metadata.rb index c74dd84..694f8f2 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer 'Chef Software, Inc.' maintainer_email 'matt@getchef.com' license 'Apache 2.0' description 'Provides the shared messaging configuration for Chef for OpenStack.' -version '9.0.1' +version '10.0.0' recipe 'server', 'Installs and configures server packages for messaging queue used by the deployment.' recipe 'rabbitmq-server', 'Installs and configures RabbitMQ and is called via the server recipe' @@ -13,5 +13,5 @@ recipe 'rabbitmq-server', 'Installs and configures RabbitMQ and is called via th supports os end -depends 'openstack-common', '~> 9.0' +depends 'openstack-common', '~> 10.0' depends 'rabbitmq', '>= 3.0.4' diff --git a/spec/rabbitmq-server-redhat_spec.rb b/spec/rabbitmq-server-redhat_spec.rb index f3e5d36..cdfcf6f 100644 --- a/spec/rabbitmq-server-redhat_spec.rb +++ b/spec/rabbitmq-server-redhat_spec.rb @@ -10,7 +10,7 @@ describe 'openstack-ops-messaging::rabbitmq-server' do include_context 'ops_messaging_stubs' it 'does not set use_distro_version to true' do - expect(chef_run.node['rabbitmq']['use_distro_version']).to be_false + expect(chef_run.node['rabbitmq']['use_distro_version']).to_not be_truthy end end diff --git a/spec/rabbitmq-server_spec.rb b/spec/rabbitmq-server_spec.rb index dc48864..9b6ddb0 100644 --- a/spec/rabbitmq-server_spec.rb +++ b/spec/rabbitmq-server_spec.rb @@ -15,7 +15,7 @@ describe 'openstack-ops-messaging::rabbitmq-server' do expect(chef_run.node['rabbitmq']['address']).to eq('127.0.0.1') expect(chef_run.node['rabbitmq']['default_user']).to eq('guest') expect(chef_run.node['rabbitmq']['default_pass']).to eq('rabbit-pass') - expect(chef_run.node['rabbitmq']['use_distro_version']).to be_true + expect(chef_run.node['rabbitmq']['use_distro_version']).to be_truthy end it 'overrides rabbit and openstack image attributes' do @@ -41,7 +41,7 @@ describe 'openstack-ops-messaging::rabbitmq-server' do end it 'overrides cluster' do - expect(chef_run.node['rabbitmq']['cluster']).to be_true + expect(chef_run.node['rabbitmq']['cluster']).to be_truthy end it 'overrides erlang_cookie' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 22a1baf..39bb9f1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -23,22 +23,22 @@ SUSE_OPTS = { shared_context 'ops_messaging_stubs' do before do - Chef::Recipe.any_instance.stub(:address_for) + allow_any_instance_of(Chef::Recipe).to receive(:address_for) .with('lo') .and_return '127.0.0.1' - Chef::Recipe.any_instance.stub(:address_for) + allow_any_instance_of(Chef::Recipe).to receive(:address_for) .with('eth0') .and_return '33.44.55.66' - Chef::Recipe.any_instance.stub(:search) + allow_any_instance_of(Chef::Recipe).to receive(:search) .with(:node, 'roles:os-ops-messaging AND chef_environment:_default') .and_return [ { 'hostname' => 'host2' }, { 'hostname' => 'host1' } ] - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', anything) .and_return 'rabbit-pass' - Chef::Recipe.any_instance.stub(:get_password) + allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('service', 'rabbit_cookie') .and_return 'erlang-cookie' end