Files
cookbook-openstack-network/spec/server-redhat_spec.rb
gengjh 6cda0639c3 Support neutron configuration
Since in OpenStack Havana release the Quantum project was renamed to the
Neutron, for the cookbooks we also need do the same things to support
the Neutron. I do the %s/Quantum/Neutron/g in all the files under
cookbook-openstack-netwrok. It will effect other cookbooks:
openstack-compute, openstack-ops-database which should be covered in
others patches.

Implemented: blueprint neutron-support

Change-Id: I59f3f2d8dfad678f70b97d4cbc4e10dfa163e9b2
2013-12-13 22:37:04 +08:00

41 lines
1.4 KiB
Ruby

require_relative "spec_helper"
describe 'openstack-network::server' do
describe "redhat" do
before do
neutron_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS do |n|
n.set["openstack"]["compute"]["network"]["service_type"] = "neutron"
end
@node = @chef_run.node
@chef_run.converge "openstack-network::server"
end
it "does not install openstack-neutron when nova networking" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["openstack"]["compute"]["network"]["service_type"] = "nova"
chef_run.converge "openstack-network::server"
expect(chef_run).to_not install_package "openstack-neutron"
end
it "installs openstack-neutron packages" do
expect(@chef_run).to install_package "openstack-neutron"
end
it "enables openstack-neutron server service" do
expect(@chef_run).to enable_service "neutron-server"
end
it "does not install openvswitch package" do
opts = ::REDHAT_OPTS.merge(:evaluate_guards => true)
chef_run = ::ChefSpec::ChefRunner.new opts do |n|
n.set["openstack"]["compute"]["network"]["service_type"] = "neutron"
end
chef_run.converge "openstack-network::server"
expect(chef_run).not_to install_package "openvswitch"
expect(chef_run).not_to enable_service "openstack-neutron-openvswitch-agent"
end
end
end