mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-25 05:58:16 +02:00
config: use config.Config instead of config.Options everywhere
This commit is contained in:
parent
5f51510e91
commit
1b80e8a6c2
40 changed files with 484 additions and 412 deletions
|
@ -49,15 +49,13 @@ func TestMiddleware(t *testing.T) {
|
|||
srv2 := httptest.NewServer(h.Middleware(next))
|
||||
defer srv2.Close()
|
||||
|
||||
cfg := &config.Config{
|
||||
Options: &config.Options{
|
||||
SharedKey: cryptutil.NewBase64Key(),
|
||||
Policies: []config.Policy{{
|
||||
To: config.WeightedURLs{{URL: *u}},
|
||||
KubernetesServiceAccountToken: "ABCD",
|
||||
}},
|
||||
},
|
||||
}
|
||||
cfg := config.New(&config.Options{
|
||||
SharedKey: cryptutil.NewBase64Key(),
|
||||
Policies: []config.Policy{{
|
||||
To: config.WeightedURLs{{URL: *u}},
|
||||
KubernetesServiceAccountToken: "ABCD",
|
||||
}},
|
||||
})
|
||||
h.Update(context.Background(), cfg)
|
||||
|
||||
policyID, _ := cfg.Options.Policies[0].RouteID()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue