Skip to content

Commit df5ddc7

Browse files
committed
Fix assignment to nil map in e2e scheduling predicates
Ready schedulable nodes are being inserted into an unitialized string set, causing an assignment to entry in nil map in the underlying data structure. This initializes the string set before attempting to insert nodes. Signed-off-by: hasheddan <[email protected]>
1 parent e529bd0 commit df5ddc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/scheduling/predicates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const (
5252

5353
var localStorageVersion = utilversion.MustParseSemantic("v1.8.0-beta.0")
5454

55-
// variable set in BeforeEach, never modified afterwards
56-
var workerNodes sets.String
55+
// variable populated in BeforeEach, never modified afterwards
56+
var workerNodes = sets.String{}
5757

5858
type pausePodConfig struct {
5959
Name string

0 commit comments

Comments
 (0)