From 9aa423a99a02bf977d31edaf74ba0372060797d1 Mon Sep 17 00:00:00 2001
From: Luca Moser <moser.luca@gmail.com>
Date: Wed, 8 Jan 2020 12:02:43 +0100
Subject: [PATCH] init global logger in tests

---
 plugins/bundleprocessor/bundleprocessor_test.go | 3 +++
 plugins/tangle/solidifier_test.go               | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/plugins/bundleprocessor/bundleprocessor_test.go b/plugins/bundleprocessor/bundleprocessor_test.go
index 484d6a29..b8cdd9df 100644
--- a/plugins/bundleprocessor/bundleprocessor_test.go
+++ b/plugins/bundleprocessor/bundleprocessor_test.go
@@ -11,9 +11,11 @@ import (
 	"github.com/iotaledger/goshimmer/plugins/tangle"
 	"github.com/iotaledger/goshimmer/plugins/tipselection"
 	"github.com/iotaledger/hive.go/events"
+	"github.com/iotaledger/hive.go/logger"
 	"github.com/iotaledger/hive.go/node"
 	"github.com/iotaledger/iota.go/consts"
 	"github.com/magiconair/properties/assert"
+	"github.com/spf13/viper"
 )
 
 var seed = client.NewSeed("YFHQWAUPCXC9S9DSHP9NDF9RLNPMZVCMSJKUKQP9SWUSUCPRQXCMDVDVZ9SHHESHIQNCXWBJF9UJSWE9Z", consts.SecurityLevelMedium)
@@ -23,6 +25,7 @@ func init() {
 	if err != nil {
 		log.Fatalf("Failed to initialize config: %s", err)
 	}
+	logger.InitGlobalLogger(&viper.Viper{})
 }
 
 func BenchmarkValidateSignatures(b *testing.B) {
diff --git a/plugins/tangle/solidifier_test.go b/plugins/tangle/solidifier_test.go
index 139febe3..e93cfdce 100644
--- a/plugins/tangle/solidifier_test.go
+++ b/plugins/tangle/solidifier_test.go
@@ -9,7 +9,9 @@ import (
 	"github.com/iotaledger/goshimmer/packages/model/value_transaction"
 	"github.com/iotaledger/goshimmer/packages/parameter"
 	"github.com/iotaledger/hive.go/events"
+	"github.com/iotaledger/hive.go/logger"
 	"github.com/iotaledger/hive.go/node"
+	"github.com/spf13/viper"
 	"github.com/stretchr/testify/require"
 )
 
@@ -18,6 +20,8 @@ func init() {
 	if err != nil {
 		log.Fatalf("Failed to initialize config: %s", err)
 	}
+
+	logger.InitGlobalLogger(&viper.Viper{})
 }
 
 func TestSolidifier(t *testing.T) {
-- 
GitLab