mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
console: turn authentication into a proper component
This commit is contained in:
19
console/authentication/tests.go
Normal file
19
console/authentication/tests.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build !release
|
||||
|
||||
package authentication
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"akvorado/common/reporter"
|
||||
)
|
||||
|
||||
// NewMock instantiantes a new authentication component
|
||||
func NewMock(t *testing.T, r *reporter.Reporter) *Component {
|
||||
t.Helper()
|
||||
c, err := New(r, DefaultConfiguration())
|
||||
if err != nil {
|
||||
t.Fatalf("New() error:\n%+v", err)
|
||||
}
|
||||
return c
|
||||
}
|
||||
Reference in New Issue
Block a user