Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
cdc0e2ab
Commit
cdc0e2ab
authored
3 years ago
by
Fabian Seidl
Browse files
Options
Downloads
Patches
Plain Diff
added description for solution of a bug when writing test outputs
parent
2c9d4857
No related branches found
No related tags found
1 merge request
!287
Implement data persisting for user management
Pipeline
#100063
passed
3 years ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller/northbound/server/auth_test.go
+4
-0
4 additions, 0 deletions
controller/northbound/server/auth_test.go
with
4 additions
and
0 deletions
controller/northbound/server/auth_test.go
+
4
−
0
View file @
cdc0e2ab
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment