Files
cookbook-openstack-block-st…/spec/backup_spec.rb
Samuel Cassiba c18919e533 block-storage refactor for Pike and Chef 13
- deprecated postgresql support
- dropped apt cookbook dependency
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- implemented foodcritic and cookstyle corrections
- migrated cinder api to a Chef-managed config
- deprecated cinder-group-active service, as it is no longer needed and gets in
  the way of functionality
- added lvm cookbook dependency for better pv/vg handling

Implements blueprint modern-chef

Change-Id: Id248c9267af6750c871487bc8b577aa2011a782a
2017-12-12 17:34:08 -08:00

38 lines
1.0 KiB
Ruby

# encoding: UTF-8
#
# Cookbook Name:: openstack-block-storage
require_relative 'spec_helper'
describe 'openstack-block-storage::backup' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }
include_context 'block-storage-stubs'
describe 'enable cinder backup service' do
it 'upgrades cinder backup package' do
expect(chef_run).to upgrade_package 'cinder-backup'
end
it 'starts cinder backup' do
expect(chef_run).to start_service 'cinder-backup'
end
it 'starts cinder backup on boot' do
expect(chef_run).to enable_service 'cinder-backup'
end
it 'subscribes to the template change' do
expect(chef_run.service('cinder-backup')).to subscribe_to('template[/etc/cinder/cinder.conf]')
end
it 'upgrades mysql python package' do
expect(chef_run).to upgrade_package 'python-mysqldb'
end
end
end
end