From 68d1036de861c2cdef3bfc55ef187450d138f211 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 3 Sep 2023 13:30:46 +0100 Subject: [PATCH] Fix mobile unit test --- contrib/mobile/mobile_test.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/contrib/mobile/mobile_test.go b/contrib/mobile/mobile_test.go index 880e5fc..7468929 100644 --- a/contrib/mobile/mobile_test.go +++ b/contrib/mobile/mobile_test.go @@ -1,9 +1,21 @@ package mobile -import "testing" +import ( + "os" + "testing" + + "github.com/gologme/log" +) func TestStartYggdrasil(t *testing.T) { - ygg := &Yggdrasil{} + logger := log.New(os.Stdout, "", 0) + logger.EnableLevel("error") + logger.EnableLevel("warn") + logger.EnableLevel("info") + + ygg := &Yggdrasil{ + logger: logger, + } if err := ygg.StartAutoconfigure(); err != nil { t.Fatalf("Failed to start Yggdrasil: %s", err) }