DashboardService: Consolidate constructors (#31886)
* DashboardService: Consolidate constructors Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -23,18 +25,11 @@ func TestProvisionedSymlinkedFolder(t *testing.T) {
|
||||
}
|
||||
|
||||
reader, err := NewDashboardFileReader(cfg, log.New("test-logger"))
|
||||
if err != nil {
|
||||
t.Error("expected err to be nil")
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
want, err := filepath.Abs(containingID)
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("expected err to be nil")
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
resolvedPath := reader.resolvedPath()
|
||||
if resolvedPath != want {
|
||||
t.Errorf("got %s want %s", resolvedPath, want)
|
||||
}
|
||||
assert.Equal(t, want, resolvedPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user