Change the single-quoted string to double quotes
to allow embedded references to variables without
which the credentials files do not get created under
$HOME.
Error:
[ERROR] failed to expand variables in target location
'$HOME/.aws/credentials' : Error processing tokens
copy managed file [jenkins-s3-log-ship] to
file:/w/workspace/aaa-ci-pipeline_70_101670_21/$HOME/
.aws/credentials
Update the test to add $HOME mock variable.
Issue-ID: RELENG-4327
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I8019d0c0bc9aa3eacf8eb902e33102271de303bb
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
     def setup() {
         lfInfraShipLogs = loadPipelineScriptForTest('vars/lfInfraShipLogs.groovy')
         explicitlyMockPipelineVariable('lfCommon')
+       explicitlyMockPipelineVariable('HOME')
     }
 
     def "Test lfInfraShipLogs [Should] throw exception [When] logSettingsFile is null" () {
 
             if ("$S3_BUCKET" =~ /.*logs-s3.*/) {
                 // If S3_BUCKET is defined, we need the config file
                 configFileProvider([configFile(fileId: "jenkins-s3-log-ship",
-                    targetLocation: '$HOME/.aws/credentials')]) {
+                    targetLocation: "$HOME/.aws/credentials")]) {
                     echo 'Running shell/logs-deploy.sh'
                     sh(script: libraryResource('shell/logs-deploy.sh'))
                 }