Merge "Update spec files to be rubocop compliant"

This commit is contained in:
Jenkins
2014-01-29 07:08:33 +00:00
committed by Gerrit Code Review
4 changed files with 6 additions and 6 deletions

View File

@@ -3,11 +3,11 @@ AllCops:
- Gemfile
- metadata.rb
- attributes/**
- spec/**
Excludes:
- files/**
- recipes/**
- spec/**
- templates/**
# UTF-8 headers not generally in these files

View File

@@ -17,7 +17,7 @@ describe 'openvswitch::build_openvswitch_source' do
node.set['openstack']['compute']['network']['service_type'] = 'nova'
chef_run.converge 'openstack-network::openvswitch'
chef_run.converge 'openstack-network::build_openvswitch_source'
['build-essential', 'pkg-config', 'fakeroot', 'libssl-dev', 'openssl', 'debhelper', 'autoconf'].each do |pkg|
%w(build-essential pkg-config fakeroot libssl-dev openssl debhelper autoconf).each do |pkg|
expect(chef_run).to_not install_package pkg
end
end
@@ -25,7 +25,7 @@ describe 'openvswitch::build_openvswitch_source' do
# since our mocked version of ubuntu is precise, our compile
# utilities should be installed to build OVS from source
it 'installs openvswitch build dependencies' do
['build-essential', 'pkg-config', 'fakeroot', 'libssl-dev', 'openssl', 'debhelper', 'autoconf'].each do |pkg|
%w(build-essential pkg-config fakeroot libssl-dev openssl debhelper autoconf).each do |pkg|
expect(@chef_run).to install_package pkg
end
end

View File

@@ -24,7 +24,7 @@ describe 'openstack-network::dhcp_agent' do
# since our mocked version of ubuntu is precise, our compile
# utilities should be installed to build dnsmasq
it 'installs dnsmasq build dependencies' do
['build-essential', 'pkg-config', 'libidn11-dev', 'libdbus-1-dev', 'libnetfilter-conntrack-dev', 'gettext'].each do |pkg|
%w(build-essential pkg-config libidn11-dev libdbus-1-dev libnetfilter-conntrack-dev gettext).each do |pkg|
expect(@chef_run).to install_package pkg
end
end

View File

@@ -45,7 +45,7 @@ MOCK_NODE_NETWORK_DATA =
}
}
def neutron_stubs
def neutron_stubs # rubocop:disable MethodLength
::Chef::Recipe.any_instance.stub(:rabbit_servers)
.and_return('1.1.1.1:5672,2.2.2.2:5672')
::Chef::Recipe.any_instance.stub(:config_by_role)
@@ -62,7 +62,7 @@ def neutron_stubs
.with('secrets', 'neutron_metadata_secret')
.and_return('metadata-secret')
::Chef::Recipe.any_instance.stub(:get_password)
.with('db', anything())
.with('db', anything)
.and_return('neutron')
::Chef::Recipe.any_instance.stub(:get_password)
.with('service', 'openstack-network')