From 5b1121ddf5947abb870e0fd035730e373afb2a5f Mon Sep 17 00:00:00 2001 From: Al Berez Date: Wed, 12 Feb 2025 13:28:43 -0800 Subject: [PATCH] Pass fixtures via the absolute path to address new filepath-securejoin library constraint more details https://github.com/cyphar/filepath-securejoin/releases/tag/v0.4.1 --- cf/appfiles/app_files_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cf/appfiles/app_files_test.go b/cf/appfiles/app_files_test.go index 63e79ce3571..61e0f539d16 100644 --- a/cf/appfiles/app_files_test.go +++ b/cf/appfiles/app_files_test.go @@ -108,7 +108,8 @@ var _ = Describe("AppFiles", func() { Describe("CopyFiles", func() { It("copies only the files specified", func() { - copyDir := filepath.Join(fixturePath, "app-copy-test") + copyDir, err := filepath.Abs(filepath.Join(fixturePath, "app-copy-test")) + Expect(err).NotTo(HaveOccurred()) filesToCopy := []models.AppFileFields{ {Path: filepath.Join("dir1")}, @@ -117,7 +118,8 @@ var _ = Describe("AppFiles", func() { files := []string{} - fileutils.TempDir("copyToDir", func(tmpDir string, err error) { + fileutils.TempDir("copyToDir", func(tmpDir string, tmpErr error) { + Expect(tmpErr).NotTo(HaveOccurred()) copyErr := appFiles.CopyFiles(filesToCopy, copyDir, tmpDir) Expect(copyErr).ToNot(HaveOccurred())