mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
26 lines
554 B
Go
26 lines
554 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]interface{}{
|
|
"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))
|
|
}
|