Skip to content

Commit 5f20bec

Browse files
authored
Pass fixtures via the absolute path to address new filepath-securejoin library constraint (#3402)
more details https://github.com/cyphar/filepath-securejoin/releases/tag/v0.4.1
1 parent 51a29ac commit 5f20bec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cf/appfiles/app_files_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ var _ = Describe("AppFiles", func() {
108108

109109
Describe("CopyFiles", func() {
110110
It("copies only the files specified", func() {
111-
copyDir := filepath.Join(fixturePath, "app-copy-test")
111+
copyDir, err := filepath.Abs(filepath.Join(fixturePath, "app-copy-test"))
112+
Expect(err).NotTo(HaveOccurred())
112113

113114
filesToCopy := []models.AppFileFields{
114115
{Path: filepath.Join("dir1")},
@@ -117,7 +118,8 @@ var _ = Describe("AppFiles", func() {
117118

118119
files := []string{}
119120

120-
fileutils.TempDir("copyToDir", func(tmpDir string, err error) {
121+
fileutils.TempDir("copyToDir", func(tmpDir string, tmpErr error) {
122+
Expect(tmpErr).NotTo(HaveOccurred())
121123
copyErr := appFiles.CopyFiles(filesToCopy, copyDir, tmpDir)
122124
Expect(copyErr).ToNot(HaveOccurred())
123125

0 commit comments

Comments
 (0)