From 25bb6410572caf2daa51b85b6d5de5fac609f710 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Mon, 19 Feb 2018 15:56:45 +0100 Subject: Make the tests less noisy The TestWaitForSuccessBrokenFunction generated lots of useless noise, this commit silences it. --- libvirt/utils_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libvirt') diff --git a/libvirt/utils_test.go b/libvirt/utils_test.go index 19318216..f2cd9aaf 100644 --- a/libvirt/utils_test.go +++ b/libvirt/utils_test.go @@ -1,8 +1,11 @@ package libvirt import ( + "bytes" "errors" + "log" "net" + "os" "testing" "time" ) @@ -60,9 +63,12 @@ func TestWaitForSuccessEverythingFine(t *testing.T) { func TestWaitForSuccessBrokenFunction(t *testing.T) { waitSleep := WaitSleepInterval waitTimeout := WaitTimeout + var b bytes.Buffer + log.SetOutput(&b) defer func() { WaitSleepInterval = waitSleep WaitTimeout = waitTimeout + log.SetOutput(os.Stderr) }() WaitTimeout = 1 * time.Second -- cgit v1.2.3