Files
cookbook-openstack-common/spec/spec_helper.rb
Samuel Cassiba 7740328325 Simplify identity endpoint
Per the Keystone Install Guide[1] the admin endpoint is superseded in
favor of a single public endpoint. As a result, the admin endpoint is no
longer deployed by default.

[1] https://docs.openstack.org/keystone/queens/install/keystone-install-ubuntu.html#install-and-configure-components

Change-Id: Ied0fb46ae8c10273fde31691b910dc2748845faf
Implements: blueprint simplify-identity-endpoint
2018-06-14 21:05:25 -07:00

51 lines
1.2 KiB
Ruby

# encoding: UTF-8
require 'chefspec'
require 'chefspec/berkshelf'
ChefSpec::Coverage.start! { add_filter 'openstack-common' }
RSpec.configure do |config|
config.color = true
config.formatter = :documentation
config.log_level = :fatal
end
UBUNTU_OPTS = {
platform: 'ubuntu',
version: '16.04',
}.freeze
REDHAT_OPTS = {
platform: 'redhat',
version: '7.4',
}.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