Files
cookbook-openstack-block-st…/spec/api-redhat_spec.rb
Mark Vanderwiel 23754b4c06 Allow packages to be updatable
In order for package updates to occur, package resources need to use
the upgrade action.  This is first phase of blueprint, to get some
consistency, next phase is to allow some update control.

Change-Id: Ibf9aeea1a814383c298e432286c45a433ff257ed
Implements: blueprint allow-package-updates
2014-05-05 10:35:49 -05:00

43 lines
1.2 KiB
Ruby

# encoding: UTF-8
#
# Cookbook Name:: openstack-block-storage
require_relative 'spec_helper'
describe 'openstack-block-storage::api' do
describe 'redhat' do
let(:runner) { ChefSpec::Runner.new(REDHAT_OPTS) }
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }
include_context 'block-storage-stubs'
it 'upgrades cinder api package' do
expect(chef_run).to upgrade_package 'python-cinderclient'
end
it 'upgrades mysql python package' do
expect(chef_run).to upgrade_package 'MySQL-python'
end
it 'upgrades db2 python packages if explicitly told' do
node.set['openstack']['db']['block-storage']['service_type'] = 'db2'
['python-ibm-db', 'python-ibm-db-sa'].each do |pkg|
expect(chef_run).to upgrade_package pkg
end
end
it 'upgrades postgresql python packages if explicitly told' do
node.set['openstack']['db']['block-storage']['service_type'] = 'postgresql'
expect(chef_run).to upgrade_package 'python-psycopg2'
expect(chef_run).not_to upgrade_package 'MySQL-python'
end
it 'starts cinder api on boot' do
expect(chef_run).to enable_service 'openstack-cinder-api'
end
end
end