From cdc0e2ab8b14d34fae1e6a9638c0d7d8a8942050 Mon Sep 17 00:00:00 2001 From: Fabian Seidl <fabian.b.seidl@stud.h-da.de> Date: Fri, 29 Apr 2022 15:48:25 +0200 Subject: [PATCH] added description for solution of a bug when writing test outputs --- controller/northbound/server/auth_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/northbound/server/auth_test.go b/controller/northbound/server/auth_test.go index 409b19e3e..ba6487644 100644 --- a/controller/northbound/server/auth_test.go +++ b/controller/northbound/server/auth_test.go @@ -833,6 +833,10 @@ func createTestRoles() error { return nil } +// This is needed as a workaround for a bug where the output of the getUser test falsely was +// that it failed while actually passing. Apparantely, this can happen when loggers write +// the output of test cases. +// Solution found here: https://github.com/gotestyourself/gotestsum/issues/141#issuecomment-686243110 func patchLogger(t *testing.T) { orig := log.Writer() buf := new(bytes.Buffer) -- GitLab