
Instead of keeping a local copy of spec_helper_acceptance.rb and requiring updates to all modules for any change, we can move it into the common helper gem and require it from there. This will make it easier to create and review changes that affect all puppet modules. Also change the Gemfile to look for the gem in the local workspace if running in a zuul environment. Change-Id: Ic0775473835f523d587b8e39170084fa5c37bcbe
30 lines
809 B
Ruby
30 lines
809 B
Ruby
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'puppet-openstack_health::api manifest', :if => ['debian', 'ubuntu'].include?(os[:family]) do
|
|
def pp_path
|
|
base_path = File.dirname(__FILE__)
|
|
File.join(base_path, 'fixtures')
|
|
end
|
|
|
|
def frontend_puppet_module
|
|
module_path = File.join(pp_path, 'frontend.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
it 'should work with no errors' do
|
|
apply_manifest(frontend_puppet_module, catch_failures: true)
|
|
end
|
|
|
|
describe 'required services' do
|
|
describe 'ports are open and services are reachable' do
|
|
describe port(80) do
|
|
it { should be_listening }
|
|
end
|
|
|
|
describe command('curl http://localhost --verbose') do
|
|
its(:stdout) { should contain('OpenStack Health') }
|
|
end
|
|
end
|
|
end
|
|
end
|