Add SQLBuilder support for SQLite databases.
This commit is contained in:
parent
d197956271
commit
e8f4c2b31b
50 changed files with 5851 additions and 75 deletions
33
tests/internal/utils/repo/repo.go
Normal file
33
tests/internal/utils/repo/repo.go
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package repo
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// GetRootDirPath will return this repo full dir path
|
||||
func GetRootDirPath() string {
|
||||
cmd := exec.Command("git", "rev-parse", "--show-toplevel")
|
||||
byteArr, err := cmd.Output()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return strings.TrimSpace(string(byteArr))
|
||||
}
|
||||
|
||||
// GetTestsDirPath will return tests folder full path
|
||||
func GetTestsDirPath() string {
|
||||
return filepath.Join(GetRootDirPath(), "tests")
|
||||
}
|
||||
|
||||
// GetTestsFilePath will return full file path of the file in the tests folder
|
||||
func GetTestsFilePath(subPath string) string {
|
||||
return filepath.Join(GetTestsDirPath(), subPath)
|
||||
}
|
||||
|
||||
// GetTestDataFilePath will return full file path of the file in the testdata folder
|
||||
func GetTestDataFilePath(subPath string) string {
|
||||
return filepath.Join(GetTestsDirPath(), "testdata", subPath)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue