Skip to content

Commit

Permalink
remove --force related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamza15 committed Mar 3, 2025
1 parent 4ca2798 commit f1ad579
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions go/vt/vtctl/workflow/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package workflow

import (
"context"
"errors"
"fmt"
"slices"
"sort"
Expand Down Expand Up @@ -356,55 +355,6 @@ func TestMoveTablesTrafficSwitching(t *testing.T) {
CurrentState: "Reads Not Switched. Writes Not Switched",
},
},
{
name: "forward with tablet refresh error",
sourceKeyspace: &testKeyspace{
KeyspaceName: sourceKeyspaceName,
ShardNames: []string{"0"},
},
targetKeyspace: &testKeyspace{
KeyspaceName: targetKeyspaceName,
ShardNames: []string{"-80", "80-"},
},
req: &vtctldatapb.WorkflowSwitchTrafficRequest{
Keyspace: targetKeyspaceName,
Workflow: workflowName,
Direction: int32(DirectionForward),
TabletTypes: tabletTypes,
},
preFunc: func(env *testEnv) {
env.tmc.SetRefreshStateError(env.tablets[sourceKeyspaceName][startingSourceTabletUID], errors.New("tablet refresh error"))
env.tmc.SetRefreshStateError(env.tablets[targetKeyspaceName][startingTargetTabletUID], errors.New("tablet refresh error"))
},
wantErr: true,
},
{
name: "forward with tablet refresh error and force",
sourceKeyspace: &testKeyspace{
KeyspaceName: sourceKeyspaceName,
ShardNames: []string{"0"},
},
targetKeyspace: &testKeyspace{
KeyspaceName: targetKeyspaceName,
ShardNames: []string{"-80", "80-"},
},
req: &vtctldatapb.WorkflowSwitchTrafficRequest{
Keyspace: targetKeyspaceName,
Workflow: workflowName,
Direction: int32(DirectionForward),
TabletTypes: tabletTypes,
Force: true,
},
preFunc: func(env *testEnv) {
env.tmc.SetRefreshStateError(env.tablets[sourceKeyspaceName][startingSourceTabletUID], errors.New("tablet refresh error"))
env.tmc.SetRefreshStateError(env.tablets[targetKeyspaceName][startingTargetTabletUID], errors.New("tablet refresh error"))
},
want: &vtctldatapb.WorkflowSwitchTrafficResponse{
Summary: fmt.Sprintf("SwitchTraffic was successful for workflow %s.%s", targetKeyspaceName, workflowName),
StartState: "Reads Not Switched. Writes Not Switched",
CurrentState: "All Reads Switched. Writes Switched",
},
},
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
Expand Down

0 comments on commit f1ad579

Please sign in to comment.