From 3362685890641c65c955c33bc7ebff5e354505d4 Mon Sep 17 00:00:00 2001 From: abicky Date: Wed, 10 Feb 2021 06:02:51 +0900 Subject: [PATCH] Disable logs during tests --- internal/service/service_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/service/service_test.go b/internal/service/service_test.go index 2b2bca1..dceef3d 100644 --- a/internal/service/service_test.go +++ b/internal/service/service_test.go @@ -1,6 +1,9 @@ package service_test import ( + "io/ioutil" + "log" + "os" "reflect" "testing" @@ -13,6 +16,11 @@ import ( "github.com/abicky/ecsmec/internal/testing/testutil" ) +func TestMain(m *testing.M) { + log.SetOutput(ioutil.Discard) + os.Exit(m.Run()) +} + func expectCopy( t *testing.T, ecsMock *mocks.MockECSAPI,