
Add basic tests to ensure the puppet classes apply cleanly and the site comes up. Uses a stubbed version of planet.ini to avoid waiting to sync all the content. Change-Id: I6baa4a1ba977845e6648932f6c2f15949fe6d0ff
32 lines
800 B
Ruby
Executable File
32 lines
800 B
Ruby
Executable File
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'planet', if: os[:family] == 'ubuntu' do
|
|
|
|
def pp_path
|
|
base_path = File.dirname(__FILE__)
|
|
File.join(base_path, 'fixtures')
|
|
end
|
|
|
|
def puppet_manifest
|
|
manifest_path = File.join(pp_path, 'default.pp')
|
|
File.read(manifest_path)
|
|
end
|
|
|
|
it 'should work with no errors' do
|
|
apply_manifest(puppet_manifest, catch_failures: true)
|
|
end
|
|
|
|
it 'should be idempotent' do
|
|
apply_manifest(puppet_manifest, catch_changes: true)
|
|
end
|
|
|
|
describe command('cd /var/lib/planet/openstack && planet /var/lib/planet/openstack/planet.ini') do
|
|
its(:exit_status) { should eq 0 }
|
|
end
|
|
|
|
describe command('curl http://localhost') do
|
|
its(:stdout) { should contain('<title>Planet OpenStack</title>') }
|
|
end
|
|
|
|
end
|