Updated some tests

This commit is contained in:
Fletcher Haynes 2023-03-01 16:24:32 -08:00
parent 39dd2e7bed
commit 8e349cabd9
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ func TestCreateABACPolicyEnforcer(t *testing.T) {
t.Errorf("Result was not false!")
}
result, err = enf.S.Decision(enf.CTX, sdk.DecisionOptions{Path: "/featurebase/authz/allow", Input: map[string]interface{}{"method": "SELECT", "path": "index_a", "user": "fletcher"}})
result, err = enf.S.Decision(enf.CTX, sdk.DecisionOptions{Path: "/featurebase/authz/allow", Input: map[string]interface{}{"method": "SELECT", "index": "index_a", "user": "fletcher"}})
if err != nil {
t.Errorf("Error testing OPA decision: %s", err)

View file

@ -4,7 +4,7 @@ default allow = false
allow {
input.method = "SELECT"
input.path = "index_a"
input.index = "index_a"
input.user = "fletcher"
}
}