do not create tempest.conf from .sample file

tempest.conf.sample does not exist anymore* so we need to stop relying
on this file to create the tempest.conf configuration file.

* c8a39b488b

This patch drops the File resource that managed tempest.conf.

Closes-Bug: #1482949
Change-Id: I7c3d20a61aa88a25f1215cccb4cb36168eab05c5
This commit is contained in:
Emilien Macchi 2015-08-09 00:08:13 -04:00
parent 7507b4bca6
commit 0e9c5dbf51
2 changed files with 4 additions and 23 deletions

View File

@ -132,16 +132,9 @@ class tempest(
$tempest_conf = "${tempest_clone_path}/etc/tempest.conf"
file { $tempest_conf:
replace => false,
source => "${tempest_conf}.sample",
require => Vcsrepo[$tempest_clone_path],
owner => $tempest_clone_owner,
}
Tempest_config {
path => $tempest_conf,
require => File[$tempest_conf],
require => Vcsrepo[$tempest_clone_path],
}
} else {
Tempest_config {
@ -203,8 +196,8 @@ class tempest(
ensure => present,
tempest_conf_path => $tempest_conf,
image_name => $image_name,
require => File[$tempest_conf],
}
Tempest_config<||> -> Tempest_glance_id_setter['image_ref']
} elsif ($image_name and $image_ref) or (! $image_name and ! $image_ref) {
fail('A value for either image_name or image_ref must be provided.')
}
@ -213,8 +206,8 @@ class tempest(
ensure => present,
tempest_conf_path => $tempest_conf,
image_name => $image_name_alt,
require => File[$tempest_conf],
}
Tempest_config<||> -> Tempest_glance_id_setter['image_ref_alt']
} elsif ($image_name_alt and $image_ref_alt) or (! $image_name_alt and ! $image_ref_alt) {
fail('A value for either image_name_alt or image_ref_alt must \
be provided.')
@ -227,8 +220,8 @@ be provided.')
ensure => present,
tempest_conf_path => $tempest_conf,
network_name => $public_network_name,
require => File[$tempest_conf],
}
Tempest_config<||> -> Tempest_neutron_net_id_setter['public_network_id']
} elsif ($public_network_name and $public_network_id) or (! $public_network_name and ! $public_network_id) {
fail('A value for either public_network_id or public_network_name \
must be provided.')

View File

@ -142,15 +142,6 @@ describe 'tempest' do
)
end
it 'load configuration' do
is_expected.to contain_file('/var/lib/tempest/etc/tempest.conf').with(
:replace => false,
:source => '/var/lib/tempest/etc/tempest.conf.sample',
:require => "Vcsrepo[/var/lib/tempest]",
:owner => 'root'
)
end
it 'configure tempest config' do
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)
@ -205,14 +196,12 @@ describe 'tempest' do
:ensure => 'present',
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
:image_name => 'image name',
:require => 'File[/var/lib/tempest/etc/tempest.conf]'
)
is_expected.to contain_tempest_glance_id_setter('image_ref_alt').with(
:ensure => 'present',
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
:image_name => 'image name alt',
:require => 'File[/var/lib/tempest/etc/tempest.conf]'
)
end
@ -221,7 +210,6 @@ describe 'tempest' do
:ensure => 'present',
:tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
:network_name => 'network name',
:require => 'File[/var/lib/tempest/etc/tempest.conf]'
)
end
end