
Add basic tests to ensure the puppet class applies cleanly and the service can start. Change-Id: I091d1cd7b4a00f1ef3c955ab330d24cd066818a6
28 lines
603 B
Ruby
Executable File
28 lines
603 B
Ruby
Executable File
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'gerritbot', 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 service('gerritbot') do
|
|
it { should be_running }
|
|
end
|
|
|
|
end
|