Chore: Fix random indices for slices in test files (#61884)

* Fix random indices for slices in test files

* Empty commit
This commit is contained in:
Santiago
2023-01-24 15:07:37 -03:00
committed by GitHub
parent 6ab79c4fba
commit e5920c211e
5 changed files with 9 additions and 8 deletions

View File

@@ -328,7 +328,7 @@ func TestCalculateAutomaticChanges(t *testing.T) {
group2 := models.GenerateGroupKey(orgID)
rules2 := models.GenerateAlertRules(4, models.AlertRuleGen(withGroupKey(group2), models.WithSequentialGroupIndex()))
movedIndex := rand.Intn(len(rules2) - 1)
movedIndex := rand.Intn(len(rules2))
movedRule := rules2[movedIndex]
copyRule := models.CopyRule(movedRule)
copyRule.RuleGroup = group.RuleGroup