Files
cookbook-openstack-network/spec/server-redhat_spec.rb
Jan Klare 2ec770de11 refactoring final step
* added new logic to render plugin templates
* refactored recipe names to be more consistence
* moved version up to 13.0.0 for mitaka release
* removed suse as supported platform
* added verisionbumb for refactored os-identity and common
* adapted optimized endpoint logic
* added endpoint attributes to fit new endpoint logic
* adapted the specs (unit tests) to work again
* refactored attributes throughout all recipes that were connected to the
  attributes used for the neutron.conf.erb template to adapt the new template
  attribute syntax
* removed some attributes that were set to non default values, since the
  defaults from neutron cloud and should be used instead
* moved all attributes form attributes/default.rb that were used in
  neutron.conf.erb to attributes/neutron_conf.rb
* refactored attributes to fit new template logic
* refactored recipes/default.rb to fit new template logic
* removed all attributes set to default values in attribtues/default and
  template
* replaced static plugin logic and templates with new config logic, following
  the same principles as for neutron.conf
* renamed recipes to fit attributes and actual service names
* added recipes for ml2_core_plugin, ml2_openvswitch and ml2_linuxbridge as well
  as a recipe for the creation of all plugin configs (plugin_conf) like plugin.ini

Change-Id: I9cc1b5cc069987ac83e064322c2291772505ff5f
Implements: blueprint cookbook-refactoring
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
2016-02-08 10:44:13 +01:00

32 lines
1.0 KiB
Ruby

# Encoding: utf-8
require_relative 'spec_helper'
describe 'openstack-network::server' do
describe 'redhat' do
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
runner.converge(described_recipe)
end
before do
node.set['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
node.set['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
end
include_context 'neutron-stubs'
it 'upgrades openstack-neutron packages' do
expect(chef_run).to upgrade_package 'openstack-neutron'
end
it 'enables openstack-neutron server service' do
expect(chef_run).to enable_service 'neutron-server'
end
it 'does not upgrade openvswitch package' do
expect(chef_run).not_to upgrade_package 'openvswitch'
expect(chef_run).not_to enable_service 'neutron-openvswitch-agent'
end
end
end