mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-06 04:21:15 +00:00
PLTCONN-4069: Refactoring
This commit is contained in:
@@ -34,9 +34,9 @@ var accountReadChecks = []Check{
|
||||
rand.Shuffle(len(accounts), func(i, j int) {
|
||||
accounts[i], accounts[j] = accounts[j], accounts[i]
|
||||
})
|
||||
count := int64(0)
|
||||
for _, account := range accounts {
|
||||
if count == readLimit {
|
||||
|
||||
for index, account := range accounts {
|
||||
if int64(index) == readLimit {
|
||||
break
|
||||
}
|
||||
acct, _, err := cc.AccountRead(ctx, account.ID(), account.UniqueID(), nil)
|
||||
@@ -44,7 +44,6 @@ var accountReadChecks = []Check{
|
||||
res.err(err)
|
||||
return
|
||||
}
|
||||
count++
|
||||
if acct.Identity != account.Identity {
|
||||
res.errf("want %q; got %q", account.Identity, acct.Identity)
|
||||
}
|
||||
|
||||
@@ -49,9 +49,8 @@ var entitlementReadChecks = []Check{
|
||||
entitlements[i], entitlements[j] = entitlements[j], entitlements[i]
|
||||
})
|
||||
|
||||
count := int64(0)
|
||||
for _, e := range entitlements {
|
||||
if count == readLimit {
|
||||
for index, e := range entitlements {
|
||||
if int64(index) == readLimit {
|
||||
break
|
||||
}
|
||||
eRead, _, err := cc.EntitlementRead(ctx, e.ID(), e.UniqueID(), "group", nil)
|
||||
@@ -59,7 +58,6 @@ var entitlementReadChecks = []Check{
|
||||
res.errf("failed to read entitlement %q: %s", e.Identity, err.Error())
|
||||
return
|
||||
}
|
||||
count++
|
||||
if e.Identity != eRead.Identity {
|
||||
res.errf("want %q; got %q", e.Identity, eRead.Identity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user