mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-15 15:56:38 +02:00
core/config: add support for maps in environments
This commit is contained in:
parent
ffca3b36a9
commit
ead090d9ce
3 changed files with 25 additions and 0 deletions
|
@ -1263,6 +1263,15 @@ func TestOptions_RequestParams(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestOptions_RequestParamsFromEnv(t *testing.T) {
|
||||
t.Setenv("IDP_REQUEST_PARAMS", `{"x":"y"}`)
|
||||
|
||||
options, err := newOptionsFromConfig("")
|
||||
if assert.NoError(t, err) {
|
||||
assert.Equal(t, map[string]string{"x": "y"}, options.RequestParams)
|
||||
}
|
||||
}
|
||||
|
||||
func encodeCert(cert *tls.Certificate) []byte {
|
||||
return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: cert.Certificate[0]})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue