mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-23 19:49:13 +02:00
core/config: add support for maps in environments (#4728)
core/config: add support for maps in environments (#4717) Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
This commit is contained in:
parent
c9583c828c
commit
34187e8ba5
3 changed files with 25 additions and 0 deletions
|
@ -1261,6 +1261,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