mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 13:37:19 +02:00
authorize: add request id to context (#3497)
* authorize: add request id to context * fix context keys
This commit is contained in:
parent
06ee1c8711
commit
89a105c8e6
4 changed files with 18 additions and 9 deletions
|
@ -322,13 +322,20 @@ func TestLoadBalancer(t *testing.T) {
|
|||
if !assert.NoError(t, err) {
|
||||
return distribution
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
bs, err := io.ReadAll(res.Body)
|
||||
if !assert.NoError(t, err) {
|
||||
return distribution
|
||||
}
|
||||
|
||||
var result struct {
|
||||
Hostname string `json:"hostname"`
|
||||
}
|
||||
err = json.NewDecoder(res.Body).Decode(&result)
|
||||
_ = res.Body.Close()
|
||||
assert.NoError(t, err)
|
||||
err = json.Unmarshal(bs, &result)
|
||||
if !assert.NoError(t, err, "invalid json: %s", bs) {
|
||||
return distribution
|
||||
}
|
||||
distribution[result.Hostname]++
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue