Skip to content

Commit

Permalink
[pocketbase#396] renamed tests.CloneIntoTempDir to tests.TempDirClone
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed Sep 7, 2022
1 parent 4bc28ab commit 74108d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewTestApp(optTestDataDir ...string) (*TestApp, error) {
testDataDir = optTestDataDir[0]
}

tempDir, err := CloneIntoTempDir(testDataDir)
tempDir, err := TempDirClone(testDataDir)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -390,12 +390,12 @@ func NewTestApp(optTestDataDir ...string) (*TestApp, error) {
return t, nil
}

// CloneIntoTempDir creates a new temporary directory copy from the
// TempDirClone creates a new temporary directory copy from the
// provided directory path.
//
// It is the caller's responsibility to call `os.RemoveAll(tempDir)`
// when the directory is no longer needed!
func CloneIntoTempDir(dirToClone string) (string, error) {
func TempDirClone(dirToClone string) (string, error) {
tempDir, err := os.MkdirTemp("", "pb_test_*")
if err != nil {
return "", err
Expand Down

0 comments on commit 74108d8

Please sign in to comment.