Merge "Add beaker tests"
This commit is contained in:
commit
11005605dc
|
@ -0,0 +1,36 @@
|
||||||
|
require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance'
|
||||||
|
|
||||||
|
describe 'subunit2sql', :if => ['debian', 'ubuntu'].include?(os[:family]) 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('jenkins-subunit-worker-A') do
|
||||||
|
it { should be_running }
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,30 @@
|
||||||
|
$content = "gearman-host: logstash.openstack.org
|
||||||
|
gearman-port: 4730
|
||||||
|
config: /etc/subunit2sql/subunit2sql.conf
|
||||||
|
mqtt-host: firehose.openstack.org
|
||||||
|
mqtt-port: 8883
|
||||||
|
mqtt-topic: gearman-subunit/localhost
|
||||||
|
mqtt-user: 'mqtt_user'
|
||||||
|
mqtt-pass: 'mqtt_pass'
|
||||||
|
mqtt-ca-certs: /etc/subunit2sql/mqtt-root-CA.pem.crt"
|
||||||
|
|
||||||
|
file { '/etc/subunit2sql/subunit-woker.yaml':
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0555',
|
||||||
|
content => $content,
|
||||||
|
}
|
||||||
|
|
||||||
|
include 'subunit2sql'
|
||||||
|
|
||||||
|
class { 'subunit2sql::server':
|
||||||
|
db_host => 'subunit2sql_db_host',
|
||||||
|
db_pass => 'subunit2sql_db_pass',
|
||||||
|
}
|
||||||
|
|
||||||
|
subunit2sql::worker { 'A':
|
||||||
|
config_file => '/etc/subunit2sql/subunit-woker.yaml',
|
||||||
|
db_host => $subunit2sql_db_host,
|
||||||
|
db_pass => $subunit2sql_db_pass,
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
service { 'jenkins-subunit-worker-A':
|
||||||
|
ensure => running,
|
||||||
|
}
|
Loading…
Reference in New Issue