// Copy a project from path to temp dir.
// projectPath - Local path to a project
// Return the copied project location and a cleanup function to delete it.
Copy a project from path to temp dir.
projectPath - Local path to a project
Return the copied project location and a cleanup function to delete it.
// Copy a project from path to temp dir . // projectPath - Local path to a project // Return the copied project location and a cleanup function to delete it .
func CreateTestProject(t *testing.T, projectPath string) (tmpProjectPath string, cleanup func()) {
	var err error
	tmpProjectPath, err = utils.CreateTempDir()
	assert.NoError(t, err)
	assert.NoError(t, utils.CopyDir(projectPath, tmpProjectPath, true, nil))
	cleanup = func() {
		assert.NoError(t, utils.RemoveTempDir(tmpProjectPath))
	}
	return
}
func CreateTestProject ( t * testing . T , projectPath string ) ( tmpProjectPath string , cleanup func ( ) ) { var err error tmpProjectPath , err = utils . CreateTempDir ( ) assert . NoError ( t , err ) assert . NoError ( t , utils . CopyDir ( projectPath , tmpProjectPath , true , nil ) ) cleanup = func ( ) { assert . NoError ( t , utils . RemoveTempDir ( tmpProjectPath ) ) } return }
Copy a project from path to temp dir.
Copy a project from path to temp dir .