From b44690563a549355bce450b3018f28c6907eae79 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 13 Mar 2018 15:43:36 +0100 Subject: [PATCH] hack city --- tests/tests.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/tests.go b/tests/tests.go index 4e5940c6ad..f153f60340 100644 --- a/tests/tests.go +++ b/tests/tests.go @@ -2,6 +2,7 @@ package tests import ( "bufio" + "bytes" "fmt" "os" "os/exec" @@ -63,7 +64,8 @@ func TestInitBasecoin(t *testing.T) { t.Error(err) } - initBasecoind.Stdout = os.Stdout + buf := new(bytes.Buffer) + initBasecoind.Stdout = buf if err := initBasecoind.Start(); err != nil { t.Error(err) @@ -78,6 +80,13 @@ func TestInitBasecoin(t *testing.T) { if err := makeKeys(); err != nil { t.Error(err) } + + fmt.Println("-----------------") + theOutput := strings.Split(buf.String(), "\n") + for i, o := range theOutput { + fmt.Println(i, o) + } + fmt.Println("-----------------") } func makeKeys() error {