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:
@@ -8,11 +8,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang/mock/gomock"
|
||||
|
||||
"akvorado/common/clickhousedb"
|
||||
"akvorado/common/daemon"
|
||||
"akvorado/common/helpers"
|
||||
"akvorado/common/http"
|
||||
"akvorado/common/reporter"
|
||||
)
|
||||
|
||||
func TestSankeyQuerySQL(t *testing.T) {
|
||||
@@ -122,17 +118,7 @@ ORDER BY xps DESC`,
|
||||
}
|
||||
|
||||
func TestSankeyHandler(t *testing.T) {
|
||||
r := reporter.NewMock(t)
|
||||
ch, mockConn := clickhousedb.NewMock(t, r)
|
||||
h := http.NewMock(t, r)
|
||||
c, err := New(r, DefaultConfiguration(), Dependencies{
|
||||
Daemon: daemon.NewMock(t),
|
||||
HTTP: h,
|
||||
ClickHouseDB: ch,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("New() error:\n%+v", err)
|
||||
}
|
||||
c, h, mockConn, _ := NewMock(t, DefaultConfiguration())
|
||||
helpers.StartStop(t, c)
|
||||
|
||||
expectedSQL := []struct {
|
||||
|
||||
Reference in New Issue
Block a user