mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
26 lines
546 B
Go
26 lines
546 B
Go
package featuremgmt
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
func TestReadingFeatureSettings(t *testing.T) {
|
|
config, err := readConfigFile("testdata/features.yaml")
|
|
require.NoError(t, err, "No error when reading feature configs")
|
|
|
|
assert.Equal(t, map[string]any{
|
|
"level": "free",
|
|
"stack": "something",
|
|
"valA": "value from features.yaml",
|
|
}, config.Vars)
|
|
|
|
out, err := yaml.Marshal(config)
|
|
require.NoError(t, err)
|
|
fmt.Printf("%s", string(out))
|
|
}
|