Change-Id: I35dfca684039512e2a238466ff7df5f3fd34d956 Addresses: blueprint refactor-spec-files Closes-Bug: 1282996
37 lines
662 B
Ruby
37 lines
662 B
Ruby
# encoding: UTF-8
|
|
|
|
require 'chefspec'
|
|
require 'chefspec/berkshelf'
|
|
|
|
LOG_LEVEL = :fatal
|
|
UBUNTU_OPTS = {
|
|
platform: 'ubuntu',
|
|
version: '12.04',
|
|
log_level: LOG_LEVEL
|
|
}
|
|
REDHAT_OPTS = {
|
|
platform: 'redhat',
|
|
version: '6.5',
|
|
log_level: LOG_LEVEL
|
|
}
|
|
SUSE_OPTS = {
|
|
platform: 'suse',
|
|
version: '11.03',
|
|
log_lovel: LOG_LEVEL
|
|
}
|
|
CHEFSPEC_OPTS = {
|
|
log_level: LOG_LEVEL
|
|
}
|
|
|
|
shared_context 'library-stubs' do
|
|
before do
|
|
subject.stub(:node).and_return(chef_run.node)
|
|
end
|
|
end
|
|
|
|
# README(galstrom21): This will remove any coverage warnings from
|
|
# dependent cookbooks
|
|
ChefSpec::Coverage.filters << '*/openstack-common'
|
|
|
|
at_exit { ChefSpec::Coverage.report! }
|