From 1def80f02c3ed0bdef83c73e2648fab835cca30c Mon Sep 17 00:00:00 2001 From: guilhermocc Date: Fri, 12 Aug 2022 11:45:07 -0300 Subject: [PATCH] Fix enqueuedSwitchVersionMessage --- .../operations/newschedulerversion/messages.go | 2 +- .../new_scheduler_version_executor_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/core/operations/newschedulerversion/messages.go b/internal/core/operations/newschedulerversion/messages.go index a6a5139fd..8cb2ad9e7 100644 --- a/internal/core/operations/newschedulerversion/messages.go +++ b/internal/core/operations/newschedulerversion/messages.go @@ -25,7 +25,7 @@ package newschedulerversion const ( startingValidationMessageTemplate = "Major version detected, starting game room validation process..." - enqueuedSwitchVersionMessageTemplate = "Enqueued switch active version operation with id: %s" + enqueuedSwitchVersionMessageTemplate = "enqueued switch active version operation with id: %s" validationSuccessMessageTemplate = "%dº Attempt: Game room validation success!" diff --git a/internal/core/operations/newschedulerversion/new_scheduler_version_executor_test.go b/internal/core/operations/newschedulerversion/new_scheduler_version_executor_test.go index 38d31eecb..949316a19 100644 --- a/internal/core/operations/newschedulerversion/new_scheduler_version_executor_test.go +++ b/internal/core/operations/newschedulerversion/new_scheduler_version_executor_test.go @@ -96,7 +96,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "Major version detected, starting game room validation process...") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "1º Attempt: Game room validation success!") - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -149,7 +149,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "1º Attempt: Unexpected Error: some error - Contact the Maestro's responsible team for helping.") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "2º Attempt: Unexpected Error: some error - Contact the Maestro's responsible team for helping.") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "3º Attempt: Game room validation success!") - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -199,7 +199,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "Major version detected, starting game room validation process...") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "1º Attempt: Game room validation success!") - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -249,7 +249,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "Major version detected, starting game room validation process...") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "1º Attempt: Game room validation success!") - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -299,7 +299,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "Major version detected, starting game room validation process...") operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, "1º Attempt: Game room validation success!") - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -629,7 +629,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { }) schedulerManager.EXPECT().GetActiveScheduler(gomock.Any(), newScheduler.Name).Return(currentActiveScheduler, nil) schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -672,7 +672,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { }) schedulerManager.EXPECT().GetActiveScheduler(gomock.Any(), newScheduler.Name).Return(currentActiveScheduler, nil) schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef) @@ -715,7 +715,7 @@ func TestCreateNewSchedulerVersionExecutor_Execute(t *testing.T) { }) schedulerManager.EXPECT().GetActiveScheduler(gomock.Any(), newScheduler.Name).Return(currentActiveScheduler, nil) schedulerManager.EXPECT().GetSchedulerVersions(gomock.Any(), newScheduler.Name).Return(schedulerVersions, nil) - operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("Enqueued switch active version operation with id: %s", switchOpID)) + operationsManager.EXPECT().AppendOperationEventToExecutionHistory(gomock.Any(), op, fmt.Sprintf("enqueued switch active version operation with id: %s", switchOpID)) result := executor.Execute(context.Background(), op, operationDef)