diff --git a/buffalo/cmd/test.go b/buffalo/cmd/test.go index 4c0da3b09..576b08938 100644 --- a/buffalo/cmd/test.go +++ b/buffalo/cmd/test.go @@ -3,6 +3,7 @@ package cmd import ( "bytes" "io" + "io/ioutil" "os" "os/exec" "path/filepath" @@ -170,6 +171,11 @@ func testPackages(givenArgs []string) ([]string, error) { func newTestCmd(args []string) *exec.Cmd { cargs := []string{"test", "-p", "1"} + if b, err := ioutil.ReadFile("database.yml"); err == nil { + if bytes.Contains(b, []byte("sqlite")) { + cargs = append(cargs, "-tags", "sqlite") + } + } cargs = append(cargs, args...) cmd := exec.Command(envy.Get("GO_BIN", "go"), cargs...) cmd.Stdin = os.Stdin