github.com/zaquestion/lab@v0.25.1/cmd/ci_lint_test.go (about) 1 package cmd 2 3 import ( 4 "os/exec" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func Test_ciLint(t *testing.T) { 11 t.Parallel() 12 repo := copyTestRepo(t) 13 cmd := exec.Command(labBinaryPath, "ci", "lint") 14 cmd.Dir = repo 15 16 b, err := cmd.CombinedOutput() 17 if err != nil { 18 t.Log(string(b)) 19 t.Fatal(err) 20 } 21 require.Contains(t, string(b), "Valid!") 22 }