acceptance: add first beaker tests
Add first acceptance tests for Beaker. Depends-On: If47aa7b368fe306d339d89a010f4ffa67402dd03 Change-Id: Ia22a5110a85294bf0585262feac9c096cc8a1dbc
This commit is contained in:
parent
2132022167
commit
70438d9ce7
|
@ -6,14 +6,14 @@
|
|||
# [*extra_params*]
|
||||
# (optional) String of extra command line parameters to append
|
||||
# to the tacker-dbsync command.
|
||||
# Defaults to undef
|
||||
# Defaults to '--config-file /etc/tacker/tacker.conf'
|
||||
#
|
||||
# [*user*]
|
||||
# (optional) User to run dbsync command.
|
||||
# Defaults to 'congress'
|
||||
#
|
||||
class tacker::db::sync(
|
||||
$extra_params = undef,
|
||||
$extra_params = '--config-file /etc/tacker/tacker.conf',
|
||||
$user = 'tacker',
|
||||
) {
|
||||
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'basic tacker' do
|
||||
|
||||
context 'default parameters' do
|
||||
|
||||
it 'should work with no errors' do
|
||||
pp= <<-EOS
|
||||
include ::openstack_integration
|
||||
include ::openstack_integration::repos
|
||||
include ::openstack_integration::rabbitmq
|
||||
include ::openstack_integration::mysql
|
||||
include ::openstack_integration::keystone
|
||||
|
||||
rabbitmq_user { 'tacker':
|
||||
admin => true,
|
||||
password => 'my_secret',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
|
||||
rabbitmq_user_permissions { 'tacker@/':
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
|
||||
class { '::tacker::db::mysql':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
warning('Gnocchi is not yet packaged on Ubuntu systems.')
|
||||
}
|
||||
'RedHat': {
|
||||
class { '::tacker::db':
|
||||
database_connection => 'mysql+pymysql://tacker:a_big_secret@127.0.0.1/tacker?charset=utf8',
|
||||
}
|
||||
class { '::tacker::keystone::auth':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::tacker::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::tacker::logging':
|
||||
debug => true,
|
||||
}
|
||||
class { '::tacker':
|
||||
default_transport_url => 'rabbit://tacker:my_secret@127.0.0.1:5672/',
|
||||
}
|
||||
include ::tacker::server
|
||||
include ::tacker::client
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
}
|
||||
}
|
||||
EOS
|
||||
|
||||
# Run it twice and test for idempotency
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
if os[:family].casecmp('RedHat') == 0
|
||||
describe port(9890) do
|
||||
it { is_expected.to be_listening }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -6,7 +6,7 @@ describe 'tacker::db::sync' do
|
|||
|
||||
it 'runs tacker-manage db sync' do
|
||||
is_expected.to contain_exec('tacker-db-sync').with(
|
||||
:command => 'tacker-db-manage upgrade head',
|
||||
:command => 'tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head',
|
||||
:user => 'tacker',
|
||||
:path => ['/bin','/usr/bin'],
|
||||
:refreshonly => 'true',
|
||||
|
|
Loading…
Reference in New Issue