cookbook-openstack-common/spec/spec_helper.rb
Samuel Cassiba 9a2c4ee365 Support for Ubuntu 16.04 and Newton
- increments Ubuntu release to 16.04
- increments release to newton for Ubuntu and CentOS
- increments apt cookbook version to 4.0
- increments mysql cookbook version to 7.2

Change-Id: I07ad79a93642d0f0c934a864fcb9bcd7b764e35f
Implements: blueprint newton-xenial
2016-09-01 04:06:52 +00:00

48 lines
1.1 KiB
Ruby

# encoding: UTF-8
require 'chefspec'
require 'chefspec/berkshelf'
ChefSpec::Coverage.start! { add_filter 'openstack-common' }
LOG_LEVEL = :fatal
UBUNTU_OPTS = {
platform: 'ubuntu',
version: '16.04',
log_level: LOG_LEVEL
}.freeze
REDHAT_OPTS = {
platform: 'redhat',
version: '7.1',
log_level: LOG_LEVEL
}.freeze
# We set a default platform for non-platform specific test cases
CHEFSPEC_OPTS = UBUNTU_OPTS
shared_context 'library-stubs' do
before do
allow(subject).to receive(:node).and_return(chef_run.node)
end
end
shared_context 'common-stubs' do
before do
allow_any_instance_of(Chef::Recipe).to receive(:search_for)
.with('os-identity').and_return(
[{
'openstack' => {
'identity' => {
'admin_tenant_name' => 'admin',
'admin_user' => 'admin'
}
}
}]
)
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('user', 'admin')
.and_return('admin')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('user', 'admin-user-override')
.and_return('admin-user-override')
end
end