206ea8c9ad
Change-Id: I85ea61fa5e3a9ae51b5f2be00bc7e81f87ddcd85 Addresses: blueprint refactor-spec-files
39 lines
1.0 KiB
Ruby
39 lines
1.0 KiB
Ruby
# encoding: UTF-8
|
|
|
|
require_relative 'spec_helper'
|
|
|
|
describe 'openstack-compute::api-os-compute' do
|
|
describe 'ubuntu' do
|
|
let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) }
|
|
let(:node) { runner.node }
|
|
let(:chef_run) { runner.converge(described_recipe) }
|
|
|
|
include_context 'compute_stubs'
|
|
include_examples 'expect_runs_nova_common_recipe'
|
|
include_examples 'expect_creates_nova_lock_dir'
|
|
include_examples 'expect_installs_python_keystone'
|
|
|
|
it 'creates the /var/cache/nova directory' do
|
|
expect(chef_run).to create_directory('/var/cache/nova').with(
|
|
user: 'nova',
|
|
group: 'nova',
|
|
mode: 0700
|
|
)
|
|
end
|
|
|
|
it 'installs openstack api packages' do
|
|
expect(chef_run).to upgrade_package 'nova-api-os-compute'
|
|
end
|
|
|
|
it 'starts openstack api on boot' do
|
|
expect(chef_run).to enable_service 'nova-api-os-compute'
|
|
end
|
|
|
|
it 'starts openstack api now' do
|
|
expect(chef_run).to start_service 'nova-api-os-compute'
|
|
end
|
|
|
|
expect_creates_api_paste 'service[nova-api-os-compute]'
|
|
end
|
|
end
|