2014-03-25 16:44:31 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'tempest' do
|
|
|
|
shared_examples 'tempest' do
|
2015-08-24 17:22:41 -04:00
|
|
|
|
|
|
|
let :pre_condition do
|
2015-08-28 13:41:55 -04:00
|
|
|
"include ::glance
|
|
|
|
class { 'neutron': rabbit_password => 'passw0rd' }"
|
2015-08-24 17:22:41 -04:00
|
|
|
end
|
|
|
|
|
2014-03-25 16:44:31 +01:00
|
|
|
context 'without parameters' do
|
|
|
|
describe "should raise error" do
|
2015-03-19 20:12:28 +01:00
|
|
|
it { expect { is_expected.to contain_class('tempest::params') }.to raise_error(Puppet::Error, /A value for either image_name or image_ref/) }
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with image_name parameters' do
|
|
|
|
let :params do
|
|
|
|
{ :image_name => 'image_name' }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "should raise error" do
|
2015-03-19 20:12:28 +01:00
|
|
|
it { expect { is_expected.to contain_class('tempest::params') }.to raise_error(Puppet::Error, /A value for either image_name_alt or image_ref_alt/) }
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-28 16:20:07 -07:00
|
|
|
context 'with image_ref parameters' do
|
|
|
|
let :params do
|
2016-11-01 15:39:56 +08:00
|
|
|
{ :image_ref => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b',
|
|
|
|
:image_ref_alt => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b' }
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'configures image_ref' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('compute/image_ref').with_value('4c423fc6-87f7-4e6d-9d3c-abc13058ae5b')
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with image_name' do
|
|
|
|
let :params do
|
2016-11-01 15:39:56 +08:00
|
|
|
{ :image_name => 'cirros',
|
|
|
|
:image_name_alt => 'cirros' }
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'uses a resource to configure image_ref from image_name' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_glance_id_setter('image_ref').with_image_name('cirros')
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with image_ref and image_name parameters' do
|
|
|
|
let :params do
|
2016-11-01 15:39:56 +08:00
|
|
|
{ :image_name => 'cirros',
|
|
|
|
:image_name_alt => 'cirros',
|
|
|
|
:image_ref => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b',
|
|
|
|
:image_ref_alt => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b' }
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
it_raises 'a Puppet::Error', /either image_name or image_ref/
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'with public_network_id parameter' do
|
|
|
|
let :params do
|
|
|
|
{ :neutron_available => true,
|
|
|
|
:configure_images => false,
|
|
|
|
:public_network_id => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b' }
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'configures public_network_id' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('network/public_network_id').with_value('4c423fc6-87f7-4e6d-9d3c-abc13058ae5b')
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with public_network_name parameter' do
|
|
|
|
let :params do
|
|
|
|
{ :neutron_available => true,
|
|
|
|
:configure_images => false,
|
|
|
|
:public_network_name => 'public' }
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'uses a resource to configure public_network_id from public_network_name' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_neutron_net_id_setter('public_network_id').with_network_name('public')
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with public_network_id and public_network_name' do
|
|
|
|
let :params do
|
|
|
|
{ :neutron_available => true,
|
|
|
|
:configure_images => false,
|
|
|
|
:public_network_name => 'public',
|
|
|
|
:public_network_id => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b' }
|
|
|
|
end
|
2015-03-19 20:12:28 +01:00
|
|
|
|
|
|
|
it_raises 'a Puppet::Error', /either public_network_id or public_network_name/
|
2014-03-28 16:20:07 -07:00
|
|
|
end
|
|
|
|
|
2014-03-25 16:44:31 +01:00
|
|
|
context 'without configures images and neutron_available' do
|
|
|
|
let :params do
|
|
|
|
{ :configure_images => false,
|
|
|
|
:neutron_available => true }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "should raise error" do
|
2015-03-19 20:12:28 +01:00
|
|
|
it { expect { is_expected.to contain_class('tempest::params') }.to raise_error(Puppet::Error, /A value for either public_network_id or public_network_name/) }
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-03-08 19:03:56 +01:00
|
|
|
context 'with sahara_plugins' do
|
|
|
|
let :params do
|
|
|
|
{ :configure_images => false,
|
|
|
|
:sahara_available => true,
|
|
|
|
:sahara_plugins => ['vanilla'] }
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'properly configures Sahara plugins in tempest.conf' do
|
|
|
|
is_expected.to contain_tempest_config('data-processing-feature-enabled/plugins').with_value(['vanilla'])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-07-28 02:07:41 -04:00
|
|
|
context 'with tempest_roles' do
|
|
|
|
let :params do
|
|
|
|
{ :configure_images => false,
|
|
|
|
:tempest_roles => ['Member', 'creator'], }
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'properly sets tempest_roles in tempest.conf' do
|
|
|
|
is_expected.to contain_tempest_config('auth/tempest_roles').with_value('Member,creator')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-09-02 00:40:44 +02:00
|
|
|
context 'with ec2api_available parameter' do
|
|
|
|
let :params do
|
|
|
|
{ :ec2api_available => true,
|
|
|
|
:configure_images => false,
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'creates ec2 credentials' do
|
|
|
|
is_expected.to contain_tempest_ec2_credentials('ec2_test_creds').with(
|
2016-11-01 15:39:56 +08:00
|
|
|
:ensure => 'present',
|
|
|
|
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
|
|
|
|
:user => 'ec2api-tester',
|
|
|
|
:project => 'openstack'
|
2016-09-02 00:40:44 +02:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2014-03-25 16:44:31 +01:00
|
|
|
context 'with parameters' do
|
|
|
|
let :params do
|
|
|
|
{ :configure_images => true,
|
|
|
|
:image_name => 'image name',
|
|
|
|
:image_name_alt => 'image name alt',
|
|
|
|
:public_network_name => 'network name',
|
2015-04-05 12:38:53 +02:00
|
|
|
:neutron_available => true,
|
2016-05-17 18:06:01 -06:00
|
|
|
:install_from_source => true,
|
|
|
|
:setup_venv => true
|
2015-04-05 12:38:53 +02:00
|
|
|
}
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "should install tempest" do
|
|
|
|
it 'installs packages' do
|
2015-04-05 12:38:53 +02:00
|
|
|
|
|
|
|
is_expected.to contain_package('git')
|
|
|
|
is_expected.to contain_package('python-setuptools')
|
|
|
|
|
|
|
|
platform_params[:dev_packages].each do |package|
|
|
|
|
is_expected.to contain_package("#{package}")
|
|
|
|
end
|
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_class('tempest::params')
|
2014-03-25 16:44:31 +01:00
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_exec('install-pip').with(
|
2016-05-17 18:06:01 -06:00
|
|
|
:command => 'easy_install pip',
|
|
|
|
:unless => 'which pip',
|
|
|
|
:path => ['/bin', '/usr/bin', '/usr/local/bin'],
|
2014-03-25 16:44:31 +01:00
|
|
|
:require => 'Package[python-setuptools]'
|
|
|
|
)
|
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_exec('install-tox').with(
|
2016-05-17 18:06:01 -06:00
|
|
|
:command => 'pip install -U tox',
|
|
|
|
:unless => 'which tox',
|
|
|
|
:path => ['/bin', '/usr/bin', '/usr/local/bin'],
|
2014-03-25 16:44:31 +01:00
|
|
|
:require => 'Exec[install-pip]'
|
|
|
|
)
|
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_vcsrepo('/var/lib/tempest').with(
|
2014-03-25 16:44:31 +01:00
|
|
|
:ensure => 'present',
|
|
|
|
:source => 'git://github.com/openstack/tempest.git',
|
|
|
|
:revision => nil,
|
|
|
|
:provider => 'git',
|
|
|
|
:require => 'Package[git]',
|
|
|
|
:user => 'root'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2016-04-04 10:28:11 -04:00
|
|
|
it 'installs python-openstackclient package' do
|
|
|
|
is_expected.to contain_package('python-openstackclient').with(
|
|
|
|
:tag => 'openstack'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2014-03-25 16:44:31 +01:00
|
|
|
it 'configure tempest config' do
|
2016-05-10 16:13:19 +02:00
|
|
|
is_expected.to contain_tempest_config('auth/admin_domain_name').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('auth/admin_password').with_secret( true )
|
|
|
|
is_expected.to contain_tempest_config('auth/admin_project_name').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('auth/admin_username').with(:value => nil)
|
2016-07-26 16:07:52 -04:00
|
|
|
is_expected.to contain_tempest_config('auth/tempest_roles').with(:value => '<SERVICE DEFAULT>')
|
2016-05-10 16:13:19 +02:00
|
|
|
is_expected.to contain_tempest_config('auth/use_dynamic_credentials').with(:value => nil)
|
2016-06-06 15:30:40 -04:00
|
|
|
is_expected.to contain_tempest_config('dns/nameservers').with(:value => nil)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('compute/change_password_available').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/flavor_ref').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/flavor_ref_alt').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/image_alt_ssh_user').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/image_ref').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/image_ref_alt').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('compute/resize_available').with(:value => nil)
|
2016-02-22 20:55:16 -05:00
|
|
|
is_expected.to contain_tempest_config('compute/build_interval').with(:value => nil)
|
2016-07-08 16:27:00 -04:00
|
|
|
is_expected.to contain_tempest_config('compute-feature-enabled/attach_encrypted_volume').with(:value => false)
|
2016-11-01 15:39:56 +08:00
|
|
|
is_expected.to contain_tempest_config('validation/image_ssh_user').with(:value => nil)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('identity/admin_role').with(:value => nil)
|
2015-07-10 15:25:01 -04:00
|
|
|
is_expected.to contain_tempest_config('identity/auth_version').with(:value => 'v2')
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('identity/alt_password').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('identity/alt_password').with_secret( true )
|
2016-05-10 16:13:19 +02:00
|
|
|
is_expected.to contain_tempest_config('identity/alt_project_name').with(:value => nil)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('identity/alt_username').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('identity/password').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('identity/password').with_secret( true )
|
2016-05-10 16:13:19 +02:00
|
|
|
is_expected.to contain_tempest_config('identity/project_name').with(:value => nil)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('identity/uri').with(:value => nil)
|
2015-07-10 15:25:01 -04:00
|
|
|
is_expected.to contain_tempest_config('identity/uri_v3').with(:value => nil)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('identity/username').with(:value => nil)
|
2016-03-04 11:52:33 -05:00
|
|
|
is_expected.to contain_tempest_config('identity/ca_certificates_file').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('identity/disable_ssl_certificate_validation').with(:value => nil)
|
2015-07-05 16:09:37 -04:00
|
|
|
is_expected.to contain_tempest_config('identity-feature-enabled/api_v2').with(:value => true)
|
|
|
|
is_expected.to contain_tempest_config('identity-feature-enabled/api_v3').with(:value => true)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('network/public_network_id').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('network/public_router_id').with(:value => '')
|
2015-09-17 23:03:11 -04:00
|
|
|
is_expected.to contain_tempest_config('dashboard/login_url').with(:value => nil)
|
|
|
|
is_expected.to contain_tempest_config('dashboard/dashboard_url').with(:value => nil)
|
2016-08-17 10:05:32 -04:00
|
|
|
is_expected.to contain_tempest_config('database/db_flavor_ref').with_value('<SERVICE DEFAULT>')
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/cinder').with(:value => true)
|
2016-10-11 17:16:29 -04:00
|
|
|
is_expected.to contain_tempest_config('volume-feature-enabled/backup').with(:value => false)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/glance').with(:value => true)
|
|
|
|
is_expected.to contain_tempest_config('service_available/heat').with(:value => false)
|
|
|
|
is_expected.to contain_tempest_config('service_available/ceilometer').with(:value => false)
|
2015-11-23 12:15:24 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/aodh').with(:value => false)
|
2016-08-09 14:23:07 -04:00
|
|
|
is_expected.to contain_tempest_config('service_available/aodh_plugin').with(:value => false)
|
2016-04-20 12:44:45 -04:00
|
|
|
is_expected.to contain_tempest_config('service_available/gnocchi').with(:value => false)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/horizon').with(:value => true)
|
|
|
|
is_expected.to contain_tempest_config('service_available/neutron').with(:value => true)
|
2016-08-09 10:59:23 -04:00
|
|
|
is_expected.to contain_tempest_config('service_available/mistral').with(:value => false)
|
2016-11-01 12:12:09 +02:00
|
|
|
is_expected.to contain_tempest_config('service_available/vitrage').with(:value => false)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/nova').with(:value => true)
|
2015-09-25 12:10:30 +03:00
|
|
|
is_expected.to contain_tempest_config('service_available/sahara').with(:value => false)
|
2015-11-13 17:18:06 +03:00
|
|
|
is_expected.to contain_tempest_config('service_available/murano').with(:value => false)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('service_available/swift').with(:value => false)
|
2015-09-30 10:02:55 -04:00
|
|
|
is_expected.to contain_tempest_config('service_available/trove').with(:value => false)
|
2016-01-02 07:28:58 -05:00
|
|
|
is_expected.to contain_tempest_config('service_available/ironic').with(:value => false)
|
2016-11-20 19:24:56 +00:00
|
|
|
is_expected.to contain_tempest_config('service_available/watcher').with(:value => false)
|
2016-02-12 11:11:53 -05:00
|
|
|
is_expected.to contain_tempest_config('service_available/zaqar').with(:value => false)
|
2016-12-05 12:01:19 +08:00
|
|
|
is_expected.to contain_tempest_config('service_available/congress').with(:value => false)
|
2016-06-06 15:30:40 -04:00
|
|
|
is_expected.to contain_tempest_config('service_available/designate').with(:value => false)
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_config('whitebox/db_uri').with(:value => nil)
|
2015-04-05 12:38:53 +02:00
|
|
|
is_expected.to contain_tempest_config('cli/cli_dir').with(:value => nil)
|
2015-07-05 16:09:37 -04:00
|
|
|
is_expected.to contain_tempest_config('oslo_concurrency/lock_path').with(:value => '/var/lib/tempest')
|
|
|
|
is_expected.to contain_tempest_config('DEFAULT/debug').with(:value => false)
|
2016-05-09 14:48:42 +08:00
|
|
|
is_expected.to contain_tempest_config('DEFAULT/log_file').with_value('<SERVICE DEFAULT>')
|
2015-07-05 16:09:37 -04:00
|
|
|
is_expected.to contain_tempest_config('DEFAULT/use_stderr').with(:value => true)
|
|
|
|
is_expected.to contain_tempest_config('DEFAULT/use_syslog').with(:value => false)
|
2016-05-09 14:48:42 +08:00
|
|
|
is_expected.to contain_tempest_config('DEFAULT/logging_context_format_string').with_value('<SERVICE DEFAULT>')
|
2015-08-28 16:55:12 -04:00
|
|
|
is_expected.to contain_tempest_config('scenario/img_dir').with(:value => '/var/lib/tempest')
|
|
|
|
is_expected.to contain_tempest_config('scenario/img_file').with(:value => 'cirros-0.3.4-x86_64-disk.img')
|
2015-12-03 18:33:09 +03:00
|
|
|
is_expected.to contain_tempest_config('service_broker/run_service_broker_tests').with(:value => false)
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'set glance id' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_glance_id_setter('image_ref').with(
|
2014-03-25 16:44:31 +01:00
|
|
|
:ensure => 'present',
|
|
|
|
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
|
|
|
|
:image_name => 'image name',
|
|
|
|
)
|
|
|
|
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_glance_id_setter('image_ref_alt').with(
|
2014-03-25 16:44:31 +01:00
|
|
|
:ensure => 'present',
|
|
|
|
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
|
|
|
|
:image_name => 'image name alt',
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'neutron net id' do
|
2015-03-19 20:12:28 +01:00
|
|
|
is_expected.to contain_tempest_neutron_net_id_setter('public_network_id').with(
|
2014-03-25 16:44:31 +01:00
|
|
|
:ensure => 'present',
|
|
|
|
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
|
|
|
|
:network_name => 'network name',
|
|
|
|
)
|
|
|
|
end
|
2016-05-17 18:06:01 -06:00
|
|
|
|
|
|
|
it 'sets up virtualenv for tempest' do
|
|
|
|
is_expected.to contain_exec('setup-venv').with(
|
|
|
|
:command => 'virtualenv /var/lib/tempest/.venv && /var/lib/tempest/.venv/bin/pip install -U -r requirements.txt',
|
|
|
|
:cwd => '/var/lib/tempest',
|
|
|
|
:unless => 'test -d /var/lib/tempest/.venv',
|
|
|
|
:path => ['/bin', '/usr/bin', '/usr/local/bin']
|
|
|
|
)
|
|
|
|
end
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-03-14 19:06:23 -04:00
|
|
|
shared_examples 'tempest with plugins packages' do
|
|
|
|
let :pre_condition do
|
|
|
|
"include ::glance
|
|
|
|
class { 'neutron': rabbit_password => 'passw0rd' }"
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with when managing tests packages for keystone (required service)' do
|
|
|
|
let :params do
|
|
|
|
{ :manage_tests_packages => true }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "should install keystone tests package" do
|
|
|
|
it { expect { is_expected.to contain_package('python-keystone-tests') } }
|
|
|
|
it { expect { is_expected.to_not contain_package('python-aodh-tests') } }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with when managing tests packages for aodh (optional service)' do
|
|
|
|
let :params do
|
|
|
|
{ :manage_tests_packages => true,
|
|
|
|
:aodh_available => true }
|
|
|
|
end
|
|
|
|
|
2016-04-02 19:23:24 +02:00
|
|
|
describe "should install aodh tests package" do
|
2016-03-14 19:06:23 -04:00
|
|
|
it { expect { is_expected.to contain_package('python-aodh-tests') } }
|
|
|
|
end
|
|
|
|
end
|
2016-04-02 19:23:24 +02:00
|
|
|
|
2016-09-14 13:25:11 +05:30
|
|
|
context 'with when managing tests packages for sahara (optional service)' do
|
|
|
|
let :params do
|
|
|
|
{ :manage_tests_packages => true,
|
2016-11-01 15:39:56 +08:00
|
|
|
:sahara_available => true }
|
2016-09-14 13:25:11 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
describe "should install sahara tests package" do
|
|
|
|
it { expect { is_expected.to contain_package('python-sahara-tests-tempest') } }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-02 19:23:24 +02:00
|
|
|
context 'with when managing tests packages for neutron (optional service)' do
|
|
|
|
let :params do
|
|
|
|
{ :manage_tests_packages => true,
|
2016-11-01 15:39:56 +08:00
|
|
|
:neutron_available => true }
|
2016-04-02 19:23:24 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "should install neutron and *aas tests packages" do
|
|
|
|
it { expect { is_expected.to contain_package('python-neutron-tests') } }
|
|
|
|
it { expect { is_expected.to contain_package('python-neutron-fwaas-tests') } }
|
|
|
|
it { expect { is_expected.to contain_package('python-neutron-lbaas-tests') } }
|
|
|
|
it { expect { is_expected.to contain_package('python-neutron-vpnaas-tests') } }
|
2016-09-14 13:25:11 +05:30
|
|
|
it { expect { is_expected.to contain_package('python-horizon-tests-tempest') } }
|
2016-04-02 19:23:24 +02:00
|
|
|
end
|
|
|
|
end
|
2016-03-14 19:06:23 -04:00
|
|
|
end
|
|
|
|
|
2016-04-06 14:50:19 +03:00
|
|
|
on_supported_os({
|
|
|
|
:supported_os => OSDefaults.get_supported_os
|
|
|
|
}).each do |os,facts|
|
|
|
|
context "on #{os}" do
|
|
|
|
let (:facts) do
|
|
|
|
facts.merge!(OSDefaults.get_facts({
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat',
|
|
|
|
}))
|
|
|
|
end
|
|
|
|
let(:platform_params) do
|
|
|
|
case facts[:osfamily]
|
|
|
|
when 'Debian'
|
|
|
|
{ :dev_packages => ['python-dev',
|
|
|
|
'libxslt1-dev',
|
|
|
|
'libxml2-dev',
|
|
|
|
'libssl-dev',
|
|
|
|
'libffi-dev',
|
|
|
|
'patch',
|
2016-04-14 10:51:27 -04:00
|
|
|
'gcc',
|
|
|
|
'python-virtualenv' ] }
|
2016-04-06 14:50:19 +03:00
|
|
|
when 'RedHat'
|
|
|
|
{ :dev_packages => ['python-devel',
|
|
|
|
'libxslt-devel',
|
|
|
|
'libxml2-devel',
|
|
|
|
'openssl-devel',
|
|
|
|
'libffi-devel',
|
|
|
|
'patch',
|
2016-04-14 10:51:27 -04:00
|
|
|
'gcc'] }
|
2016-04-06 14:50:19 +03:00
|
|
|
end
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
|
2016-04-06 14:50:19 +03:00
|
|
|
it_behaves_like 'tempest'
|
|
|
|
it_behaves_like 'tempest with plugins packages'
|
2014-03-25 16:44:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|