aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libvirt/utils_test.go6
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