console: turn authentication into a proper component

This commit is contained in:
Vincent Bernat
2022-06-09 19:55:57 +02:00
parent 9e620f2c91
commit b65d78ab1b
13 changed files with 100 additions and 197 deletions

View 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
}