
Add tests to ensure the elastic_recheck classes work and that the service can start. This module hardcodes IRC bot configs, so the tests use resource overrides to set the bot channels to a test channel that's also used elsewhere in our tests to avoid spamming our real channels. In order for the bot to actually be functional it would need to have a real gerrit account, which we don't have, but this should still be sufficient as a test. Change-Id: I6da62d63d885037ecbc1560deec323e0d8583c3c
33 lines
748 B
Ruby
Executable File
33 lines
748 B
Ruby
Executable File
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
|
|
|
describe 'elastic_recheck', 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
|
|
|
|
def postconditions_puppet_manifest
|
|
manifest_path = File.join(pp_path, 'postconditions.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('elastic-recheck') do
|
|
it { should be_running }
|
|
end
|
|
|
|
end
|