Skip to content

Commit c8a3fe2

Browse files
Merge pull request #22861 from smarterclayton/random
Fix abort-at=random on upgrade tests
2 parents 466f53e + 65d5838 commit c8a3fe2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/e2e/upgrade/upgrade.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ func SetUpgradeAbortAt(policy string) error {
9494
}
9595
if policy == "random" {
9696
upgradeAbortAt = upgradeAbortAtRandom
97+
return nil
9798
}
9899
if val, err := strconv.Atoi(policy); err == nil {
99100
if val < 0 || val > 100 {
100-
return fmt.Errorf("abort-at must be empty or an integer in [0,100], inclusive")
101+
return fmt.Errorf("abort-at must be empty, set to 'random', or an integer in [0,100], inclusive")
101102
}
102103
if val == 0 {
103104
upgradeAbortAt = 1
@@ -106,7 +107,7 @@ func SetUpgradeAbortAt(policy string) error {
106107
}
107108
return nil
108109
}
109-
return fmt.Errorf("abort-at must be empty or an integer in [0,100], inclusive")
110+
return fmt.Errorf("abort-at must be empty, set to 'random', or an integer in [0,100], inclusive")
110111
}
111112

112113
var _ = g.Describe("[Disruptive]", func() {

0 commit comments

Comments
 (0)