Files
cookbook-openstack-network/spec/openvswitch_agent_spec.rb
Mark Vanderwiel 820c8eebdb Ubuntu mitaka package name changes for openvswitch agent
neutron-openvswitch-agent
Replaces:
  neutron-plugin-ml2 (<< 2:8.0.0~b2-0ubuntu5~)
  neutron-plugin-openvswitch-agent (<< 2:8.0.0~b2-0ubuntu1~)

Change-Id: Icd75ff370f20d77f564bd6eb700704372345b0de
2016-04-06 12:10:34 -05:00

38 lines
1.1 KiB
Ruby

# Encoding: utf-8
require_relative 'spec_helper'
describe 'openstack-network::openvswitch_agent' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
node.set['openstack']['network']['openvswitch']['integration_bridge'] = 'br-int'
runner.converge(described_recipe)
end
before do
stub_command('ovs-vsctl --may-exist add-br br-int')
end
it 'upgrades openvswitch agent' do
expect(chef_run).to upgrade_package 'neutron-openvswitch-agent'
end
describe 'create integration network bridget' do
let(:cmd_br) { 'ovs-vsctl --may-exist add-br br-int' }
let(:name) { 'create integration network bridge' }
it 'adds integration network bridge' do
expect(chef_run).to run_execute(name)
.with(command: cmd_br)
end
end
it 'sets the openvswitch_agent service to start on boot' do
expect(chef_run).to enable_service 'neutron-openvswitch-agent'
end
it 'starts the openvswitch_agent service' do
expect(chef_run).to start_service 'neutron-openvswitch-agent'
end
end
end