diff --git a/tests/sqlite/main_test.go b/tests/sqlite/main_test.go index a22c5281..ba4d0cef 100644 --- a/tests/sqlite/main_test.go +++ b/tests/sqlite/main_test.go @@ -11,9 +11,7 @@ import ( "github.com/pkg/profile" "github.com/stretchr/testify/require" "os" - "os/exec" "runtime" - "strings" "testing" _ "github.com/mattn/go-sqlite3" @@ -21,7 +19,6 @@ import ( var db *sql.DB var sampleDB *sql.DB -var testRoot string func TestMain(m *testing.M) { defer profile.Start().Stop() @@ -31,8 +28,6 @@ func TestMain(m *testing.M) { } }() - setTestRoot() - var err error db, err = sql.Open("sqlite3", "file:"+dbconfig.SakilaDBPath) throw.OnError(err) @@ -51,16 +46,6 @@ func TestMain(m *testing.M) { } } -func setTestRoot() { - cmd := exec.Command("git", "rev-parse", "--show-toplevel") - byteArr, err := cmd.Output() - if err != nil { - panic(err) - } - - testRoot = strings.TrimSpace(string(byteArr)) + "/tests/" -} - var loggedSQL string var loggedSQLArgs []interface{} var loggedDebugSQL string