From 7ea4b80c5364d614c41c7f98326bb967ddf71ac6 Mon Sep 17 00:00:00 2001 From: asoseil Date: Sat, 14 Oct 2017 23:40:39 +0200 Subject: [PATCH] logs hidden --- cmd_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd_test.go b/cmd_test.go index 1c215bf..31fc478 100644 --- a/cmd_test.go +++ b/cmd_test.go @@ -3,11 +3,23 @@ package main import ( "flag" "gopkg.in/urfave/cli.v2" + "log" "reflect" "testing" "time" ) +type logT struct{} + +func (logT) Write(bytes []byte) (int, error) { + return 0, nil +} + +func TestMain(m *testing.M) { + log.SetFlags(0) + log.SetOutput(logT{}) +} + func TestBlueprint_Clean(t *testing.T) { r := realize{} r.Schema = append(r.Schema, Project{Name: "test0"}) @@ -127,5 +139,5 @@ func TestBlueprint_Run(t *testing.T) { }, } go r.run(params) - time.Sleep(1 * time.Millisecond) + time.Sleep(1 * time.Second) }