Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawyu committed Sep 28, 2023
1 parent e50c44d commit e8acfbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/scheduler/framework/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
Skip
)

var statusCodeNames = []string{"Success", "InternalError", "ClusterUnschedulable", "Skip"}
var statusCodeNames = []string{"Success", "InternalError", "ClusterUnschedulable", "ClusterAlreadySelected", "Skip"}

// Name returns the name of a status code.
func (sc StatusCode) Name() string {
Expand Down
9 changes: 8 additions & 1 deletion pkg/scheduler/framework/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ func TestNonNilStatusMethods(t *testing.T) {
sourcePlugin: dummyPlugin,
},
{
name: "status preskip",
name: "status skip",
statusCode: Skip,
reasons: dummyReasons,
sourcePlugin: dummyPlugin,
},
{
name: "status cluster already selected",
statusCode: ClusterAlreadySelected,
reasons: dummyReasons,
sourcePlugin: dummyPlugin,
},
}

for _, tc := range testCases {
Expand All @@ -73,6 +79,7 @@ func TestNonNilStatusMethods(t *testing.T) {
status.IsSuccess,
status.IsInteralError,
status.IsClusterUnschedulable,
status.IsClusterAlreadySelected,
status.IsSkip,
}
for idx, checkFunc := range checkFuncs {
Expand Down

0 comments on commit e8acfbb

Please sign in to comment.