Skip to content

Commit

Permalink
fix: mysql tests (#8682)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuriwuyun authored and wangyelei committed Dec 20, 2024
1 parent da8e45f commit 55694b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lorry/engines/mysql/get_replica_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestManager_GetRole(t *testing.T) {
expectedRoles := []string{models.PRIMARY, models.SECONDARY}

for i, leaderName := range leaderNames {
cluster := &dcs.Cluster{Leader: &dcs.Leader{Name: leaderName}}
cluster := &dcs.Cluster{Leader: &dcs.Leader{Name: leaderName, Holder: leaderName}}
mockDCSStore.EXPECT().GetLeader().Return(cluster.Leader, nil)
role, err := manager.GetReplicaRole(ctx, cluster)
assert.Nil(t, err)
Expand Down

0 comments on commit 55694b3

Please sign in to comment.