github.com/ianfoo/lab@v0.9.5-0.20180123060006-5ed79f2ccfc7/cmd/ciLint_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("../lab_bin", "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  }