Merge "Update spec files to be rubocop compliant"
This commit is contained in:
@@ -3,11 +3,11 @@ AllCops:
|
|||||||
- Gemfile
|
- Gemfile
|
||||||
- metadata.rb
|
- metadata.rb
|
||||||
- attributes/**
|
- attributes/**
|
||||||
|
- spec/**
|
||||||
|
|
||||||
Excludes:
|
Excludes:
|
||||||
- files/**
|
- files/**
|
||||||
- recipes/**
|
- recipes/**
|
||||||
- spec/**
|
|
||||||
- templates/**
|
- templates/**
|
||||||
|
|
||||||
# UTF-8 headers not generally in these files
|
# UTF-8 headers not generally in these files
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ describe 'openvswitch::build_openvswitch_source' do
|
|||||||
node.set['openstack']['compute']['network']['service_type'] = 'nova'
|
node.set['openstack']['compute']['network']['service_type'] = 'nova'
|
||||||
chef_run.converge 'openstack-network::openvswitch'
|
chef_run.converge 'openstack-network::openvswitch'
|
||||||
chef_run.converge 'openstack-network::build_openvswitch_source'
|
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
|
expect(chef_run).to_not install_package pkg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -25,7 +25,7 @@ describe 'openvswitch::build_openvswitch_source' do
|
|||||||
# since our mocked version of ubuntu is precise, our compile
|
# since our mocked version of ubuntu is precise, our compile
|
||||||
# utilities should be installed to build OVS from source
|
# utilities should be installed to build OVS from source
|
||||||
it 'installs openvswitch build dependencies' do
|
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
|
expect(@chef_run).to install_package pkg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ describe 'openstack-network::dhcp_agent' do
|
|||||||
# since our mocked version of ubuntu is precise, our compile
|
# since our mocked version of ubuntu is precise, our compile
|
||||||
# utilities should be installed to build dnsmasq
|
# utilities should be installed to build dnsmasq
|
||||||
it 'installs dnsmasq build dependencies' do
|
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
|
expect(@chef_run).to install_package pkg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ MOCK_NODE_NETWORK_DATA =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def neutron_stubs
|
def neutron_stubs # rubocop:disable MethodLength
|
||||||
::Chef::Recipe.any_instance.stub(:rabbit_servers)
|
::Chef::Recipe.any_instance.stub(:rabbit_servers)
|
||||||
.and_return('1.1.1.1:5672,2.2.2.2:5672')
|
.and_return('1.1.1.1:5672,2.2.2.2:5672')
|
||||||
::Chef::Recipe.any_instance.stub(:config_by_role)
|
::Chef::Recipe.any_instance.stub(:config_by_role)
|
||||||
@@ -62,7 +62,7 @@ def neutron_stubs
|
|||||||
.with('secrets', 'neutron_metadata_secret')
|
.with('secrets', 'neutron_metadata_secret')
|
||||||
.and_return('metadata-secret')
|
.and_return('metadata-secret')
|
||||||
::Chef::Recipe.any_instance.stub(:get_password)
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
.with('db', anything())
|
.with('db', anything)
|
||||||
.and_return('neutron')
|
.and_return('neutron')
|
||||||
::Chef::Recipe.any_instance.stub(:get_password)
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
.with('service', 'openstack-network')
|
.with('service', 'openstack-network')
|
||||||
|
|||||||
Reference in New Issue
Block a user