From c6c04ef9117205f1e23cc9c9a8adecef77c32be3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 18 Jun 2013 23:18:21 -0700 Subject: [PATCH] packer: Discard log output in tests --- packer/environment_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packer/environment_test.go b/packer/environment_test.go index 822f9bce8..125058bf2 100644 --- a/packer/environment_test.go +++ b/packer/environment_test.go @@ -5,11 +5,18 @@ import ( "cgl.tideland.biz/asserts" "errors" "fmt" + "io/ioutil" + "log" "os" "strings" "testing" ) +func init() { + // Disable log output for tests + log.SetOutput(ioutil.Discard) +} + func testEnvironment() Environment { config := DefaultEnvironmentConfig() config.Ui = &ReaderWriterUi{