From 5745b702ff377206db7d0a6a31c607873bc1acbc Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Thu, 1 Feb 2024 16:58:34 +0000 Subject: [PATCH] (GH-397) - Honour default symlink when additional symlinks delcared Before, declaring a symlink would overwrite the symlink to the current module. This is not what we would want for testing, and we should be able to declare additional symlinks to the default one. Now, we extra symlinks declared, we merge into the auto_symlink, if not operate as before. --- .rubocop_todo.yml | 4 ++-- lib/puppetlabs_spec_helper/tasks/fixtures.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8631cb2d..db4de02c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-01-22 15:48:54 UTC using RuboCop version 1.50.2. +# on 2024-02-01 17:06:08 UTC using RuboCop version 1.50.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -17,7 +17,7 @@ Gemspec/RequireMFA: # Offense count: 5 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: - Max: 55 + Max: 58 # Offense count: 3 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. diff --git a/lib/puppetlabs_spec_helper/tasks/fixtures.rb b/lib/puppetlabs_spec_helper/tasks/fixtures.rb index 5d845182..37711943 100644 --- a/lib/puppetlabs_spec_helper/tasks/fixtures.rb +++ b/lib/puppetlabs_spec_helper/tasks/fixtures.rb @@ -107,7 +107,7 @@ def fixtures(category) fixtures = fixtures['fixtures'] - fixtures['symlinks'] = auto_symlink if fixtures['symlinks'].nil? + fixtures['symlinks'] = fixtures['symlinks'].nil? ? auto_symlink : auto_symlink.merge!(fixtures['symlinks']) result = {} if fixtures.include?(category) && !fixtures[category].nil?