@@ -24,7 +24,6 @@ import (
2424 configTests "github.com/jfrog/jfrog-cli-security/tests"
2525 "github.com/stretchr/testify/assert"
2626
27- // coreTests "github.com/jfrog/jfrog-cli-core/v2/utils/tests"
2827 "github.com/jfrog/jfrog-client-go/utils/io/fileutils"
2928 "github.com/jfrog/jfrog-client-go/utils/log"
3029 clientTests "github.com/jfrog/jfrog-client-go/utils/tests"
@@ -129,17 +128,17 @@ func CreateTestWatch(t *testing.T, policyName string, watchName, severity xrayUt
129128 }
130129}
131130
132- func CreateTestProjectEnvInTempDir (t * testing.T , projectPath string ) (string , func ()) {
133- // We are not using coreTests.CreateTempDirWithCallbackAndAssert(t) since the callback fails to remove the temp dir on Windows. (Unknown reason)
134- // tempDirPath, createTempDirCallback := coreTests.CreateTempDirWithCallbackAndAssert(t )
131+ func CreateTestProjectInTempDir (t * testing.T , projectPath string ) (string , func ()) {
132+ // TODO: We are not using coreTests.CreateTempDirWithCallbackAndAssert(t) since the callback fails to remove the temp dir on Windows.
133+ // (Unknown reason, should be investigated )
135134 tempDirPath := t .TempDir ()
136135 maskedPath := filepath .Join (tempDirPath , filepath .Base (projectPath ))
137136 assert .NoError (t , biutils .CopyDir (projectPath , maskedPath , true , nil ))
138- return maskedPath , func (){}
137+ return maskedPath , func () {}
139138}
140139
141140func CreateTestProjectEnvAndChdir (t * testing.T , projectPath string ) (string , func ()) {
142- tempDirPath , createTempDirCallback := CreateTestProjectEnvInTempDir (t , projectPath )
141+ tempDirPath , createTempDirCallback := CreateTestProjectInTempDir (t , projectPath )
143142 prevWd := ChangeWD (t , tempDirPath )
144143 return tempDirPath , func () {
145144 clientTests .ChangeDirAndAssert (t , prevWd )
0 commit comments