From 39f982d42aa184ac6e0565e938718ee8edc8d7b8 Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Wed, 6 Jun 2018 07:42:26 -0700 Subject: [PATCH] Update cookbook references for berkshelf - cookstyle fixes to pass rake Change-Id: Ice10e100468e3ad96e5b929350dae0cba73489b3 --- Berksfile | 3 +-- Rakefile | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Berksfile b/Berksfile index 01d2107..94723e6 100644 --- a/Berksfile +++ b/Berksfile @@ -21,6 +21,5 @@ source 'https://supermarket.chef.io' end end -cookbook 'openstack-dns', github: 'cloudbau/cookbook-openstack-dns' -cookbook 'openstackclient', github: 'cloudbau/cookbook-openstackclient' +cookbook 'openstackclient', git: 'https://git.openstack.org/openstack/cookbook-openstackclient' cookbook 'statsd', github: 'librato/statsd-cookbook' diff --git a/Rakefile b/Rakefile index 56e8609..ef41932 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,7 @@ client_opts = "--force-formatter --no-color -z --config #{current_dir}/.chef/kni task default: ['test'] desc 'Default gate tests to run' -task test: [:rubocop, :berks_vendor, :json_check] +task test: %i(rubocop berks_vendor json_check) def run_command(command) if File.exist?('Gemfile.lock') @@ -80,19 +80,22 @@ def _run_env_queries _run_commands('basic common env queries', { 'uname' => ['-a'], 'pwd' => [''], - 'env' => [''] }, - false) + 'env' => [''], + }, + false) case @platform when 'ubuntu16' _run_commands('basic debian env queries', { 'ifconfig' => [''], - 'cat' => ['/etc/apt/sources.list'] }, - false) + 'cat' => ['/etc/apt/sources.list'], + }, + false) when 'centos7' _run_commands('basic rhel env queries', { '/usr/sbin/ip' => ['addr'], - 'cat' => ['/etc/yum.repos.d/*'] }, - false) + 'cat' => ['/etc/yum.repos.d/*'], + }, + false) end end @@ -132,7 +135,7 @@ def _save_logs(prefix, log_dir) end desc 'Integration test on Infra' -task integration: [:create_key, :berks_vendor] do +task integration: %i(create_key berks_vendor) do log_dir = ENV['WORKSPACE'] + '/logs' sh %(mkdir #{log_dir}) # This is a workaround for allowing chef-client to run in local mode