Description: Fix path for Debian
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2020-04-25

Index: puppet-module-tempest/lib/puppet/type/tempest_glance_id_setter.rb
===================================================================
--- puppet-module-tempest.orig/lib/puppet/type/tempest_glance_id_setter.rb
+++ puppet-module-tempest/lib/puppet/type/tempest_glance_id_setter.rb
@@ -1,7 +1,7 @@
 Puppet::Type.newtype(:tempest_glance_id_setter) do
 #
 #  tempest_glance_id_setter { 'compute/image_id':
-#    tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+#    tempest_conf_path => '/etc/tempest/tempest.conf',
 #    image_name        => $name,
 #  }
 #
Index: puppet-module-tempest/manifests/init.pp
===================================================================
--- puppet-module-tempest.orig/manifests/init.pp
+++ puppet-module-tempest/manifests/init.pp
@@ -17,7 +17,7 @@
 #  [*tempest_repo_uri*]
 #   Defaults to 'https://opendev.org/openstack/tempest'
 #  [*tempest_config_file*]
-#   Defaults to undef
+#   Defaults to '/etc/tempest/tempest.conf'
 #  [*tempest_repo_revision*]
 #   Defaults to undef
 #  [*tempest_clone_path*]
@@ -41,7 +41,7 @@
 #  [*identity_uri_v3*]
 #   Defaults to $facts['os_service_default']
 #  [*lock_path*]
-#   Defaults to '/var/lib/tempest'
+#   Defaults to '/var/lock/tempest'
 #  [*log_file*]
 #   Defaults to $facts['os_service_default']
 #  [*debug*]
@@ -325,7 +325,7 @@ class tempest(
   Stdlib::Absolutepath $tempest_workspace   = '/var/lib/tempest',
   Boolean $install_from_source              = true,
   Boolean $git_clone                        = true,
-  Stdlib::Absolutepath $tempest_config_file = '/var/lib/tempest/etc/tempest.conf',
+  Stdlib::Absolutepath $tempest_config_file = '/etc/tempest/tempest.conf',
 
   # Clone config
   #
@@ -355,7 +355,7 @@ class tempest(
   # tempest.conf parameters
   #
   $identity_uri_v3                          = $facts['os_service_default'],
-  $lock_path                                = '/var/lib/tempest',
+  $lock_path                                = '/var/lock/tempest',
   $log_file                                 = $facts['os_service_default'],
   $debug                                    = $facts['os_service_default'],
   $use_stderr                               = true,
@@ -587,7 +587,7 @@ class tempest(
       }
     }
 
-    $tempest_conf = "${tempest_clone_path}/etc/tempest.conf"
+    $tempest_conf = $tempest_config_file
 
     Tempest_config {
       path    => $tempest_conf,
Index: puppet-module-tempest/spec/classes/tempest_init_spec.rb
===================================================================
--- puppet-module-tempest.orig/spec/classes/tempest_init_spec.rb
+++ puppet-module-tempest/spec/classes/tempest_init_spec.rb
@@ -356,22 +356,22 @@ describe 'tempest' do
         it 'set glance id' do
           is_expected.to contain_tempest_glance_id_setter('compute/image_ref').with(
             :ensure            => 'present',
-            :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+            :tempest_conf_path => '/etc/tempest/tempest.conf',
             :image_name        => 'image name',
           )
           is_expected.to contain_tempest_glance_id_setter('compute/image_ref_alt').with(
             :ensure            => 'present',
-            :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+            :tempest_conf_path => '/etc/tempest/tempest.conf',
             :image_name        => 'image name alt',
           )
           is_expected.to contain_tempest_glance_id_setter('heat_plugin/image_ref').with(
             :ensure            => 'present',
-            :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+            :tempest_conf_path => '/etc/tempest/tempest.conf',
             :image_name        => 'heat image name',
           )
           is_expected.to contain_tempest_glance_id_setter('heat_plugin/minimal_image_ref').with(
             :ensure            => 'present',
-            :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+            :tempest_conf_path => '/etc/tempest/tempest.conf',
             :image_name        => 'image name',
           )
         end
@@ -379,7 +379,7 @@ describe 'tempest' do
         it 'neutron net id' do
           is_expected.to contain_tempest_neutron_net_id_setter('network/public_network_id').with(
             :ensure            => 'present',
-            :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+            :tempest_conf_path => '/etc/tempest/tempest.conf',
             :network_name      => 'network name',
           )
         end
@@ -480,27 +480,27 @@ describe 'tempest' do
       it "sets flavor id using setter" do
         is_expected.to contain_tempest_flavor_id_setter('compute/flavor_ref').with(
           :ensure            => 'present',
-          :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+          :tempest_conf_path => '/etc/tempest/tempest.conf',
           :flavor_name       => 'm1.tiny',
         )
         is_expected.to contain_tempest_flavor_id_setter('compute/flavor_ref_alt').with(
           :ensure            => 'present',
-          :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+          :tempest_conf_path => '/etc/tempest/tempest.conf',
           :flavor_name       => 'm1.nano',
         )
         is_expected.to contain_tempest_flavor_id_setter('database/db_flavor_ref').with(
           :ensure            => 'present',
-          :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+          :tempest_conf_path => '/etc/tempest/tempest.conf',
           :flavor_name       => 'm1.micro',
         )
         is_expected.to contain_tempest_flavor_id_setter('heat_plugin/instance_type').with(
           :ensure            => 'present',
-          :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+          :tempest_conf_path => '/etc/tempest/tempest.conf',
           :flavor_name       => 'm1.small',
         )
         is_expected.to contain_tempest_flavor_id_setter('heat_plugin/minimal_instance_type').with(
           :ensure            => 'present',
-          :tempest_conf_path => '/var/lib/tempest/etc/tempest.conf',
+          :tempest_conf_path => '/etc/tempest/tempest.conf',
           :flavor_name       => 'm1.tiny',
         )
       end
