Catch errors when building fn bin

This commit is contained in:
James Jeffrey
2017-06-30 16:47:36 -07:00
parent 70eb25c873
commit 2832c5adec

View File

@@ -26,7 +26,10 @@ func TestMainCommands(t *testing.T) {
fnTestBin := path.Join(os.TempDir(), "fn-test")
exec.Command("go", "build", "-o", fnTestBin).Run()
err := exec.Command("go", "build", "-o", fnTestBin).Run()
if err != nil {
t.Fatalf("Failed to build fn: err: %s", err)
}
for _, cmd := range testCommands {
res, err := exec.Command(fnTestBin, strings.Split(cmd, " ")...).CombinedOutput()