Initial kilo updates
* minor cleanup to spec for rubocop Change-Id: I7406b7ac8d709e8de3c252467e1ea37e107b94e0 Partial-Bug: #1426424
This commit is contained in:
parent
591c8773d2
commit
e08c83c2e9
|
@ -5,5 +5,5 @@ berks-cookbooks/
|
||||||
.coverage/
|
.coverage/
|
||||||
*.swp
|
*.swp
|
||||||
Berksfile.lock
|
Berksfile.lock
|
||||||
Gemfile.lock
|
|
||||||
Vagrantfile
|
Vagrantfile
|
||||||
|
Gemfile.lock
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
Includes:
|
Include:
|
||||||
- metadata.rb
|
- metadata.rb
|
||||||
- Gemfile
|
- Gemfile
|
||||||
- attributes/**
|
- attributes/**
|
||||||
|
@ -8,12 +10,15 @@ AllCops:
|
||||||
- recipes/**
|
- recipes/**
|
||||||
- resources/**
|
- resources/**
|
||||||
- spec/**
|
- spec/**
|
||||||
|
Exclude:
|
||||||
|
- .cookbooks/**/*
|
||||||
|
- berks-cookbooks/**/*
|
||||||
|
- .bundle/**/*
|
||||||
|
|
||||||
Encoding:
|
Encoding:
|
||||||
Exclude:
|
Exclude:
|
||||||
- metadata.rb
|
- metadata.rb
|
||||||
- Gemfile
|
- Gemfile
|
||||||
- berks-cookbooks/**
|
|
||||||
|
|
||||||
NumericLiterals:
|
NumericLiterals:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This configuration was generated by `rubocop --auto-gen-config`
|
||||||
|
# on 2015-03-02 13:36:04 -0600 using RuboCop version 0.28.0.
|
||||||
|
# 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: EnforcedStyle, SupportedStyles.
|
||||||
|
Style/ClassAndModuleChildren:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: PreferredDelimiters.
|
||||||
|
Style/PercentLiteralDelimiters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 15
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SingleSpaceBeforeFirstArg:
|
||||||
|
Enabled: false
|
|
@ -1,4 +1,4 @@
|
||||||
source "https://supermarket.getchef.com"
|
source "https://supermarket.chef.io"
|
||||||
|
|
||||||
metadata
|
metadata
|
||||||
|
|
||||||
|
|
9
Gemfile
9
Gemfile
|
@ -1,11 +1,10 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'chef', '~> 11.16.0'
|
gem 'chef', '~> 11.18.6'
|
||||||
gem 'json', '<= 1.7.7' # chef 11 dependency
|
gem 'json', '<= 1.7.7' # chef 11 dependency
|
||||||
gem 'berkshelf', '~> 3.1.5'
|
gem 'berkshelf', '~> 3.2.1'
|
||||||
gem 'hashie', '~> 2.0'
|
gem 'hashie', '~> 2.0'
|
||||||
gem 'chefspec', '~> 4.0.0'
|
gem 'chefspec', '~> 4.0.0'
|
||||||
gem 'rspec', '~> 3.0.0'
|
gem 'rspec', '~> 3.0.0'
|
||||||
gem 'fauxhai', '>= 2.1.0'
|
gem 'foodcritic', '~> 4.0'
|
||||||
gem 'foodcritic', '~> 4.0.0'
|
gem 'rubocop', '~> 0.29.1'
|
||||||
gem 'rubocop', '~> 0.18.1'
|
|
||||||
|
|
|
@ -12,4 +12,4 @@ recipe 'openstack-bare-metal::default', 'Temp workaround to create iro
|
||||||
recipe 'openstack-bare-metal::identity_registration', 'Registers ironic service/user/endpoints in keystone'
|
recipe 'openstack-bare-metal::identity_registration', 'Registers ironic service/user/endpoints in keystone'
|
||||||
recipe 'openstack-bare-metal::ironic-common', 'Defines the common pieces of repeated code from the other recipes'
|
recipe 'openstack-bare-metal::ironic-common', 'Defines the common pieces of repeated code from the other recipes'
|
||||||
|
|
||||||
depends 'openstack-common', '~> 10.0'
|
depends 'openstack-common', '~> 11.0.0'
|
||||||
|
|
|
@ -40,16 +40,11 @@ describe 'openstack-bare-metal::ironic-common' do
|
||||||
let(:dir) { chef_run.directory('/etc/ironic') }
|
let(:dir) { chef_run.directory('/etc/ironic') }
|
||||||
|
|
||||||
it 'should create the directory' do
|
it 'should create the directory' do
|
||||||
expect(chef_run).to create_directory(dir.name)
|
expect(chef_run).to create_directory(dir.name).with(
|
||||||
end
|
user: 'ironic',
|
||||||
|
group: 'ironic',
|
||||||
it 'has proper owner' do
|
mode: 0750
|
||||||
expect(dir.owner).to eq('ironic')
|
)
|
||||||
expect(dir.group).to eq('ironic')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'has proper modes' do
|
|
||||||
expect(sprintf('%o', dir.mode)).to eq('750')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -57,16 +52,11 @@ describe 'openstack-bare-metal::ironic-common' do
|
||||||
let(:file) { chef_run.template('/etc/ironic/ironic.conf') }
|
let(:file) { chef_run.template('/etc/ironic/ironic.conf') }
|
||||||
|
|
||||||
it 'should create the ironic.conf template' do
|
it 'should create the ironic.conf template' do
|
||||||
expect(chef_run).to create_template(file.name)
|
expect(chef_run).to create_template(file.name).with(
|
||||||
end
|
user: 'ironic',
|
||||||
|
group: 'ironic',
|
||||||
it 'has proper owner' do
|
mode: 0640
|
||||||
expect(file.owner).to eq('ironic')
|
)
|
||||||
expect(file.group).to eq('ironic')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'has proper modes' do
|
|
||||||
expect(sprintf('%o', file.mode)).to eq('640')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -74,16 +64,11 @@ describe 'openstack-bare-metal::ironic-common' do
|
||||||
let(:file) { chef_run.template('/etc/ironic/rootwrap.conf') }
|
let(:file) { chef_run.template('/etc/ironic/rootwrap.conf') }
|
||||||
|
|
||||||
it 'should create the /etc/ironic/rootwrap.conf file' do
|
it 'should create the /etc/ironic/rootwrap.conf file' do
|
||||||
expect(chef_run).to create_template(file.name)
|
expect(chef_run).to create_template(file.name).with(
|
||||||
end
|
user: 'root',
|
||||||
|
group: 'root',
|
||||||
it 'has proper owner' do
|
mode: 0644
|
||||||
expect(file.owner).to eq('root')
|
)
|
||||||
expect(file.group).to eq('root')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'has proper modes' do
|
|
||||||
expect(sprintf('%o', file.mode)).to eq('644')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'template contents' do
|
context 'template contents' do
|
||||||
|
|
Loading…
Reference in New Issue