Skip to content

Commit

Permalink
Fix enqueuedSwitchVersionMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermocc committed Aug 12, 2022
1 parent 46c4dcc commit 1def80f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/core/operations/newschedulerversion/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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!"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 1def80f

Please sign in to comment.