Skip to content
Snippets Groups Projects
Commit cdc0e2ab authored by Fabian Seidl's avatar Fabian Seidl
Browse files

added description for solution of a bug when writing test outputs

parent 2c9d4857
No related branches found
No related tags found
1 merge request!287Implement data persisting for user management
Pipeline #100063 passed
...@@ -833,6 +833,10 @@ func createTestRoles() error { ...@@ -833,6 +833,10 @@ func createTestRoles() error {
return nil 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) { func patchLogger(t *testing.T) {
orig := log.Writer() orig := log.Writer()
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment