From 7805e97f79216fef93626a6688468e805798d794 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Wed, 28 Feb 2018 15:52:54 -0500 Subject: [PATCH] buffalo test needs to support sqlite --- buffalo/cmd/test.go | 6 ++++++ 1 file changed, 6 insertions(+) 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