From 34560703367bee91a222a2580310bcd1fe14af18 Mon Sep 17 00:00:00 2001 From: John Mears Date: Mon, 18 Dec 2023 10:26:07 -0700 Subject: [PATCH 1/2] Add change after rebase from main --- internal/redfishwrapper/task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/redfishwrapper/task.go b/internal/redfishwrapper/task.go index 5932b0d1b..d9f8a64da 100644 --- a/internal/redfishwrapper/task.go +++ b/internal/redfishwrapper/task.go @@ -74,9 +74,9 @@ func (c *Client) taskMessagesAsString(messages []common.Message) string { func (c *Client) ConvertTaskState(state string) constants.TaskState { switch strings.ToLower(state) { - case "starting", "downloading", "downloaded": + case "starting", "downloading", "downloaded", "scheduling": return constants.Initializing - case "running", "stopping", "cancelling", "scheduling": + case "running", "stopping", "cancelling": return constants.Running case "pending", "new": return constants.Queued From 1e2d807718d801a135b3243780199533aa7c529c Mon Sep 17 00:00:00 2001 From: John Mears Date: Mon, 18 Dec 2023 10:28:26 -0700 Subject: [PATCH 2/2] Fix unit test TestConvertTaskState --- internal/redfishwrapper/task_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/redfishwrapper/task_test.go b/internal/redfishwrapper/task_test.go index 43aa5d264..d34077a72 100644 --- a/internal/redfishwrapper/task_test.go +++ b/internal/redfishwrapper/task_test.go @@ -21,10 +21,10 @@ func TestConvertTaskState(t *testing.T) { {"starting state", "starting", constants.Initializing}, {"downloading state", "downloading", constants.Initializing}, {"downloaded state", "downloaded", constants.Initializing}, + {"scheduling state", "scheduling", constants.Initializing}, {"running state", "running", constants.Running}, {"stopping state", "stopping", constants.Running}, {"cancelling state", "cancelling", constants.Running}, - {"scheduling state", "scheduling", constants.Running}, {"pending state", "pending", constants.Queued}, {"new state", "new", constants.Queued}, {"scheduled state", "scheduled", constants.PowerCycleHost},