datasource-proxy: token exchange

This commit is contained in:
Torkel Ödegaard
2017-08-23 17:18:43 +02:00
parent 4f9fbcc211
commit 3c9798bec9
6 changed files with 130 additions and 33 deletions

View File

@ -148,5 +148,18 @@ func TestDSRouteRule(t *testing.T) {
So(queryVals["p"][0], ShouldEqual, "password")
})
})
Convey("When interpolating string", func() {
data := templateData{
SecureJsonData: map[string]string{
"Test": "0+0a0sdasd00+++",
},
}
interpolated, err := interpolateString("{{.SecureJsonData.Test}}", data)
So(err, ShouldBeNil)
So(interpolated, ShouldEqual, "0+0a0sdasd00+++")
})
})
}