From f9274818dd4e353be8077b6cde33f51c1e6a854f Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Wed, 2 Aug 2017 01:46:19 -0400 Subject: [PATCH] Style and lint fixes for newer chefdk, deprecated Gemfile - Style and lint fixes for newer chefdk - Removed ancient Gemfile - Rewrote metadata.rb for readability Change-Id: I7c2950270f88cc9d54de593460009c6741913796 --- .rubocop_todo.yml | 7 ++++++- Gemfile | 14 -------------- metadata.rb | 19 +++++++++++-------- recipes/setup.rb | 4 ++-- spec/setup_spec.rb | 2 +- 5 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 Gemfile diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4961278..554e99a 100755 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,16 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2017-02-23 16:58:32 +0100 using RuboCop version 0.39.0. +# on 2017-08-02 01:41:47 -0400 using RuboCop version 0.47.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. +# Offense count: 5 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/BlockLength: + Max: 191 + # Offense count: 2 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: nested, compact diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 31c90b5..0000000 --- a/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -## THIS GEMFILE IS DEPRECATED AND WILL BE REMOVED AFTER THE NEXT RELEASE -## THERE WON'T BE ANY UPDATES TO THIS FILE DURING THIS RELEASE CYCLE -## WE SWITCHED TO CHEFDK AS THE BUNDLE FOR THE NEEDED GEMS - -source 'https://rubygems.org' - -gem 'chef', '~> 11.18.6' -gem 'json', '<= 1.7.7' # chef 11 dependency -gem 'berkshelf', '~> 3.2.1' -gem 'hashie', '~> 2.0' -gem 'chefspec', '~> 4.0.0' -gem 'rspec', '~> 3.0.0' -gem 'foodcritic', '~> 4.0' -gem 'rubocop', '~> 0.29.1' diff --git a/metadata.rb b/metadata.rb index cf75445..908e597 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,13 +1,11 @@ -# encoding: UTF-8 -name 'openstack-integration-test' -maintainer 'openstack-chef' +name 'openstack-integration-test' +maintainer 'openstack-chef' maintainer_email 'openstack-dev@lists.openstack.org' -issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url) -source_url 'https://github.com/openstack/cookbook-openstack-integration-test' if respond_to?(:source_url) -license 'Apache 2.0' -description 'Installs and configures the Tempest Integration Test Suite' +license 'Apache 2.0' +description 'Installs and configures the Tempest Integration Test Suite' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '15.0.0' +version '15.0.0' + recipe 'openstack-integration-test::setup', 'Installs and configures Tempest' %w(ubuntu redhat centos).each do |os| @@ -20,4 +18,9 @@ depends 'openstack-image', '>= 15.0.0' depends 'openstack-compute', '>= 15.0.0' depends 'openstack-block-storage', '>= 15.0.0' depends 'openstackclient' + depends 'poise-python', '~> 1.5' + +issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url) +source_url 'https://github.com/openstack/cookbook-openstack-integration-test' if respond_to?(:source_url) +chef_version '>= 12.5' if respond_to?(:chef_version) diff --git a/recipes/setup.rb b/recipes/setup.rb index 5e8d1f9..861cd59 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -124,7 +124,7 @@ template "#{venv_path}/tempest.sh" do source 'tempest.sh.erb' user 'root' group 'root' - mode 0755 + mode 0o755 variables( venv_path: venv_path ) @@ -184,7 +184,7 @@ template '/opt/tempest/etc/tempest.conf' do cookbook 'openstack-common' owner 'root' group 'root' - mode 00600 + mode 0o0600 variables( service_config: integration_test_conf_options ) diff --git a/spec/setup_spec.rb b/spec/setup_spec.rb index 2f02df8..7767fac 100644 --- a/spec/setup_spec.rb +++ b/spec/setup_spec.rb @@ -169,7 +169,7 @@ describe 'openstack-integration-test::setup' do expect(chef_run).to create_template(file.name).with( user: 'root', group: 'root', - mode: 00600 + mode: 0o0600 ) end