Files
Georges Chaudy e270412dbf unistore: wire the authz client (#96632)
* unistore: wire the authz client

* rename dashboards.grafana.app into dashboard.grafana.app

* wire the authz client

* wire the authz client

* resuse the Standalone constructor

* configure default migration for resource folder

* add tests

* cleanup

* add logging
2024-11-19 15:13:30 +02:00

23 lines
549 B
Go

package standalone
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestReadRuntimeCOnfig(t *testing.T) {
out, err := ReadRuntimeConfig("all/all=true,dashboard.grafana.app/v0alpha1=false")
require.NoError(t, err)
require.Equal(t, []RuntimeConfig{
{Group: "all", Version: "all", Enabled: true},
{Group: "dashboard.grafana.app", Version: "v0alpha1", Enabled: false},
}, out)
require.Equal(t, "all/all=true", fmt.Sprintf("%v", out[0]))
// Empty is an error
_, err = ReadRuntimeConfig("")
require.Error(t, err)
}