mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-21 18:48:06 +02:00
core/authorize: cache prepared query building
This commit is contained in:
parent
0b79a28328
commit
42233223cb
11 changed files with 143 additions and 67 deletions
|
@ -176,10 +176,11 @@ func TestNewPolicyEvaluator_addDefaultClientCertificateRule(t *testing.T) {
|
|||
c := &cases[i]
|
||||
t.Run(c.label, func(t *testing.T) {
|
||||
store := store.New()
|
||||
compiler := evaluator.NewRegoCompiler(store)
|
||||
c.opts.Policies = []config.Policy{{
|
||||
To: mustParseWeightedURLs(t, "http://example.com"),
|
||||
}}
|
||||
e, err := newPolicyEvaluator(c.opts, store)
|
||||
e, err := newPolicyEvaluator(c.opts, compiler)
|
||||
require.NoError(t, err)
|
||||
|
||||
r, err := e.Evaluate(context.Background(), &evaluator.Request{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue