Skip to content

Commit

Permalink
Pass fixtures via the absolute path to address new filepath-securejoi…
Browse files Browse the repository at this point in the history
  • Loading branch information
a-b authored Feb 13, 2025
1 parent 51a29ac commit 5f20bec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cf/appfiles/app_files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")},
Expand All @@ -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())

Expand Down

0 comments on commit 5f20bec

Please sign in to comment.