fuel-library/tests/noop/spec/hosts/roles/mongo_spec.rb
Vladimir Kuklin 2cd8c10151 Add noop tests for files injection
1) Add test to check whether catalog contains
injection of files which actually should be
installed as packages
2) Add more fixtures with astute yamls
3) Shared examples structure refactoring
4) Remove File.exists? checks from install_ssh_keys
5) Add rspec and puppet debug options
6) Misc fixes to make rspec actually work

Change-Id: I8217594cd9f2c0f19c840c0abed37d94ff80eb75
blueprint: package-fuel-components
2015-05-13 21:30:25 +03:00

21 lines
542 B
Ruby

require 'spec_helper'
require 'shared-examples'
manifest = 'roles/mongo.pp'
describe manifest do
before (:each) do
Puppet::Parser::Functions::newfunction(:file, :arity => -2, :type => :rvalue) do |vals|
return 'key' if vals.first == '/var/lib/astute/mongodb/mongodb.key'
raise Puppet::ParseError, "Could not find any files from #{vals.join(", ")}"
end
end
shared_examples 'catalog' do
it do
should contain_file('/etc/mongodb.key').with_content('key')
end
end
test_ubuntu_and_centos manifest
end