Files
cookbook-openstack-network/spec/common-redhat_spec.rb
Matt Thompson 4776e4f957 Clean up cookbook for bp/clean-up-attr-for-mq-and-db
This change removes the attributes we'll be moving to openstack-common
and changes reference of those attributes to reflect new (more
consistent) namespace. We also fix a test where node isn't being
converged after setting attributes and import chefspec/berksfile in
spec/spec_helper.rb so we can run rspec outside of strainer.

Change-Id: I7e27a60c4245de2e4d8033439a2429d89006a356
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-24 10:30:02 +00:00

28 lines
819 B
Ruby

# Encoding: utf-8
require_relative 'spec_helper'
describe 'openstack-network::common' do
describe 'redhat' do
before do
neutron_stubs
@chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS do |n|
n.set['openstack']['compute']['network']['service_type'] = 'neutron'
end
@chef_run.converge 'openstack-network::common'
end
it 'installs mysql python packages by default' do
expect(@chef_run).to install_package 'MySQL-python'
end
it 'installs db2 python packages if explicitly told' do
@chef_run.node.set['openstack']['db']['network']['service_type'] = 'db2'
@chef_run.converge 'openstack-network::common'
['db2-odbc', 'python-ibm-db', 'python-ibm-db-sa'].each do |pkg|
expect(@chef_run).to install_package pkg
end
end
end
end