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
60 lines
2.3 KiB
Ruby
60 lines
2.3 KiB
Ruby
require_relative 'spec_helper'
|
|
|
|
describe "openvswitch::build_openvswitch_source" do
|
|
before do
|
|
neutron_stubs
|
|
@chef_run = ::ChefSpec::ChefRunner.new(::UBUNTU_OPTS) do |n|
|
|
n.set["openstack"]["compute"]["network"]["service_type"] = "neutron"
|
|
end
|
|
@chef_run.converge "openstack-network::openvswitch"
|
|
@chef_run.converge "openstack-network::build_openvswitch_source"
|
|
end
|
|
|
|
it "does not install openvswitch build dependencies 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::openvswitch"
|
|
chef_run.converge "openstack-network::build_openvswitch_source"
|
|
[ "build-essential", "pkg-config", "fakeroot", "libssl-dev", "openssl", "debhelper", "autoconf" ].each do |pkg|
|
|
expect(chef_run).to_not install_package pkg
|
|
end
|
|
end
|
|
|
|
# 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|
|
|
expect(@chef_run).to install_package pkg
|
|
end
|
|
end
|
|
|
|
it "installs openvswitch switch dpkg" do
|
|
pkg = @chef_run.dpkg_package("openvswitch-switch")
|
|
|
|
pkg.source.should == "/var/chef/cache/22df718eb81fcfe93228e9bba8575e50/openvswitch-switch_1.10.2-1_amd64.deb"
|
|
pkg.action.should == [:nothing]
|
|
end
|
|
|
|
it "installs openvswitch datapath dkms dpkg" do
|
|
pkg = @chef_run.dpkg_package("openvswitch-datapath-dkms")
|
|
|
|
pkg.source.should == "/var/chef/cache/22df718eb81fcfe93228e9bba8575e50/openvswitch-datapath-dkms_1.10.2-1_all.deb"
|
|
pkg.action.should == [:nothing]
|
|
end
|
|
|
|
it "installs openvswitch pki dpkg" do
|
|
pkg = @chef_run.dpkg_package("openvswitch-pki")
|
|
|
|
pkg.source.should == "/var/chef/cache/22df718eb81fcfe93228e9bba8575e50/openvswitch-pki_1.10.2-1_all.deb"
|
|
pkg.action.should == [:nothing]
|
|
end
|
|
|
|
it "installs openvswitch common dpkg" do
|
|
pkg = @chef_run.dpkg_package("openvswitch-common")
|
|
|
|
pkg.source.should == "/var/chef/cache/22df718eb81fcfe93228e9bba8575e50/openvswitch-common_1.10.2-1_amd64.deb"
|
|
pkg.action.should == [:nothing]
|
|
end
|
|
end
|