Skip to content

Commit

Permalink
refactor: policy exception constraint type (#842)
Browse files Browse the repository at this point in the history
* refactor: policy exception constraint type

Signed-off-by: Darren Murray <[email protected]>
  • Loading branch information
dmurray-lacework committed Jun 30, 2022
1 parent 22c1005 commit 88bfdb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/policy_exceptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ type PolicyException struct {
}

type PolicyExceptionConstraint struct {
FieldKey string `json:"fieldKey"`
FieldValues []string `json:"fieldValues"`
FieldKey string `json:"fieldKey"`
FieldValues []any `json:"fieldValues"`
}
2 changes: 1 addition & 1 deletion api/policy_exceptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func TestPolicyExceptionUpdate(t *testing.T) {

policyException := api.PolicyException{
Description: "exception description",
Constraints: []api.PolicyExceptionConstraint{{FieldKey: "accountIds", FieldValues: []string{"*"}}},
Constraints: []api.PolicyExceptionConstraint{{FieldKey: "accountIds", FieldValues: []any{"*"}}},
}
assert.Equal(t, "exception description", policyException.Description, "policy exception description mismatch")
assert.Equal(t, "accountIds", policyException.Constraints[0].FieldKey, "policy exception field key mismatch")
Expand Down

0 comments on commit 88bfdb5

Please sign in to comment.