-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Evaluation is responsible to enforce casing (#550)"
This reverts commit a0ec7dd.
- Loading branch information
Showing
38 changed files
with
289 additions
and
807 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
apps/policy-engine/src/resource/open-policy-agent/rego/__test__/criteria/approval_test.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions
16
...licy-engine/src/resource/open-policy-agent/rego/__test__/criteria/intent/source_test.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
apps/policy-engine/src/resource/open-policy-agent/rego/__test__/criteria/principal_test.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 14 additions & 13 deletions
27
apps/policy-engine/src/resource/open-policy-agent/rego/__test__/criteria/resource_test.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package main | ||
|
||
import data.armory.entities.get | ||
|
||
test_resource { | ||
account = get.account(input.resource.uid) with input as requestWithEip1559Transaction with data.entities as entities | ||
|
||
expected := { | ||
"id": "eip155:eoa:0xDDcf208f219a6e6af072f2cfdc615b2c1805f98e", | ||
"address": "0xddcf208F219a6e6af072f2cfdc615b2c1805f98e", | ||
account = resource with input as requestWithEip1559Transaction with data.entities as entities | ||
account == { | ||
"id": "eip155:eoa:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e", | ||
"address": "0xddcf208f219a6e6af072f2cfdc615b2c1805f98e", | ||
"accountType": "eoa", | ||
"assignees": ["test-bOb-uid", "test-alicE-uid", "test-foo-uid", "test-bar-uid"], | ||
"groups": {"test-account-group-ONE-uid"}, | ||
"assignees": ["test-bob-uid", "test-alice-uid", "test-foo-uid", "test-bar-uid"], | ||
} | ||
account == expected | ||
|
||
checkAccountId({"eip155:eoa:0xdDcF208f219a6e6af072f2cfdc615b2c1805F98E"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
checkAccountAddress({"0xdDCf208f219a6e6af072f2cfdc615b2c1805f98e"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
groups = accountGroups with input as requestWithEip1559Transaction with data.entities as entities | ||
groups == {"test-account-group-one-uid"} | ||
|
||
accountGroupsById = getAccountGroups("eip155:eoa:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e") with input as requestWithEip1559Transaction with data.entities as entities | ||
accountGroupsById == {"test-account-group-one-uid"} | ||
|
||
checkAccountId({"eip155:eoa:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
checkAccountAddress({"0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
checkAccountType({"eoa"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
checkAccountGroup({"teST-account-groUp-one-uid"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
checkAccountGroup({"test-account-group-one-uid"}) with input as requestWithEip1559Transaction with data.entities as entities | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
apps/policy-engine/src/resource/open-policy-agent/rego/__test__/utils_test.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.