Skip to content

Commit

Permalink
Removing redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
safaci2000 committed Oct 10, 2024
1 parent 7e34e69 commit 5f42894
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/sqlite/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ import (
"github.com/pkg/profile"
"github.com/stretchr/testify/require"
"os"
"os/exec"
"runtime"
"strings"
"testing"

_ "github.com/mattn/go-sqlite3"
)

var db *sql.DB
var sampleDB *sql.DB
var testRoot string

func TestMain(m *testing.M) {
defer profile.Start().Stop()
Expand All @@ -31,8 +28,6 @@ func TestMain(m *testing.M) {
}
}()

setTestRoot()

var err error
db, err = sql.Open("sqlite3", "file:"+dbconfig.SakilaDBPath)
throw.OnError(err)
Expand All @@ -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
Expand Down

0 comments on commit 5f42894

Please sign in to comment.