Add initial spec test
This commit is contained in:
parent
5c91a3e852
commit
1ce39dc22c
3
deployment/puppet/horizon/.fixtures.yml
Normal file
3
deployment/puppet/horizon/.fixtures.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fixtures:
|
||||||
|
symlinks:
|
||||||
|
"horizon": "#{source_dir}"
|
5
deployment/puppet/horizon/.gemfile
Normal file
5
deployment/puppet/horizon/.gemfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
source :rubygems
|
||||||
|
|
||||||
|
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
|
||||||
|
gem 'puppet', puppetversion
|
||||||
|
gem 'puppetlabs_spec_helper', '>= 0.1.0'
|
1
deployment/puppet/horizon/Rakefile
Normal file
1
deployment/puppet/horizon/Rakefile
Normal file
@ -0,0 +1 @@
|
|||||||
|
require 'puppetlabs_spec_helper/rake_tasks'
|
33
deployment/puppet/horizon/spec/classes/horizon_init_spec.rb
Normal file
33
deployment/puppet/horizon/spec/classes/horizon_init_spec.rb
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'horizon' do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
'cache_server_ip' => '10.0.0.1'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
describe 'when running on redhat' do
|
||||||
|
let :facts do
|
||||||
|
{
|
||||||
|
'osfamily' => 'RedHat'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it {
|
||||||
|
should contain_service('httpd').with_name('httpd')
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
describe 'when running on debian' do
|
||||||
|
let :facts do
|
||||||
|
{
|
||||||
|
'osfamily' => 'Debian'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it {
|
||||||
|
should contain_service('httpd').with_name('apache2')
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
0
deployment/puppet/horizon/spec/fixtures/manifests/site.pp
vendored
Normal file
0
deployment/puppet/horizon/spec/fixtures/manifests/site.pp
vendored
Normal file
1
deployment/puppet/horizon/spec/spec_helper.rb
Normal file
1
deployment/puppet/horizon/spec/spec_helper.rb
Normal file
@ -0,0 +1 @@
|
|||||||
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
Loading…
Reference in New Issue
Block a user