Skip to content

Commit

Permalink
PR(FEEDBACK): Add documentation to the "*" safeguard
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Nov 25, 2024
1 parent f5dff5a commit f61d27e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ func getIdentity(s *state, identity immutable.Option[identity]) acpIdentity.Iden
if !identity.HasValue() {
return acpIdentity.Identity{}
}

// The selector must never be "*" here because this function returns a specific identity from the
// stored identities, if "*" string needs to be signaled to the acp module then it should be handled
// a call before this function.
if identity.Value().selector == "*" {
require.Fail(s.t, "Used the \"*\" selector for identity incorrectly.", s.testCase.Description)
}
Expand Down

0 comments on commit f61d27e

Please sign in to comment.