Merge "Add beaker tests"

This commit is contained in:
Zuul 2018-11-21 22:49:09 +00:00 committed by Gerrit Code Review
commit b7cbc13e2b
3 changed files with 54 additions and 0 deletions

36
spec/acceptance/basic_spec.rb Executable file
View File

@ -0,0 +1,36 @@
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
describe 'statusbot' 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
it 'should start' do
apply_manifest(postconditions_puppet_manifest, catch_failures: true)
end
describe service('statusbot') do
it { should be_running }
end
end

View File

@ -0,0 +1,15 @@
class { 'statusbot':
nick => 'statusbot-test',
password => 'statusbot-password',
server => 'irc.notreal.net',
channels => 'unrealchannel',
auth_nicks => 'statusbot-test',
wiki_user => 'dummy',
wiki_password => 'dummy',
wiki_url => 'dummy',
wiki_pageid => 'dummy',
wiki_successpageid => 'dummy',
wiki_successpageurl => 'dummy',
wiki_thankspageid => 'dummy',
wiki_thankspageurl => 'dummy',
}

View File

@ -0,0 +1,3 @@
service { 'statusbot':
ensure => running,
}