diff options
author | Flavio Castelli <fcastelli@suse.com> | 2018-02-19 15:56:45 +0100 |
---|---|---|
committer | Flavio Castelli <fcastelli@suse.com> | 2018-02-19 15:56:45 +0100 |
commit | 25bb6410572caf2daa51b85b6d5de5fac609f710 (patch) | |
tree | f687dcf8070111f84adabbbdaf60385c245445d9 /libvirt | |
parent | 5431c9858508017abed2c35f46acf5c0c31c6d5b (diff) | |
download | terraform-provider-libvirt-25bb6410572caf2daa51b85b6d5de5fac609f710.tar terraform-provider-libvirt-25bb6410572caf2daa51b85b6d5de5fac609f710.tar.gz |
Make the tests less noisy
The TestWaitForSuccessBrokenFunction generated lots of useless noise,
this commit silences it.
Diffstat (limited to 'libvirt')
-rw-r--r-- | libvirt/utils_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 |