Files
grafana/pkg/api/pluginproxy/utils_test.go
T

21 lines
401 B
Go
Raw Normal View History

package pluginproxy
import (
"testing"
2020-11-17 11:31:35 +01:00
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestInterpolateString(t *testing.T) {
2020-11-17 11:31:35 +01:00
data := templateData{
SecureJsonData: map[string]string{
"Test": "0asd+asd",
},
}
2020-11-17 11:31:35 +01:00
interpolated, err := interpolateString("{{.SecureJsonData.Test}}", data)
require.NoError(t, err)
assert.Equal(t, "0asd+asd", interpolated)
}