MetaData Changes: - bump metadata version to 12 Other codes changes - change juno to kilo where appropriate - rubocop todo file updates - removed db2 refs Bootstrap Changes - Updated to 0.7.0 release of the ChefDK Change-Id: I65745eae2e430ced0c25e8f05dd490fdad840623
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.2 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: '14.04',
 | 
						|
  log_level: LOG_LEVEL
 | 
						|
}
 | 
						|
REDHAT_OPTS = {
 | 
						|
  platform: 'redhat',
 | 
						|
  version: '7.1',
 | 
						|
  log_level: LOG_LEVEL
 | 
						|
}
 | 
						|
SUSE_OPTS = {
 | 
						|
  platform: 'suse',
 | 
						|
  version: '11.3',
 | 
						|
  log_lovel: LOG_LEVEL
 | 
						|
}
 | 
						|
# 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
 |