From 49417850dd2d58aec1adf3d204cf149d5f1f4764 Mon Sep 17 00:00:00 2001
From: Rohit Nayak <rohit@planetscale.com>
Date: Wed, 1 Nov 2023 16:44:54 +0100
Subject: [PATCH] Fix panic in TestStreamMigrateMainflow

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
---
 go/vt/wrangler/fake_tablet_test.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/go/vt/wrangler/fake_tablet_test.go b/go/vt/wrangler/fake_tablet_test.go
index 0fc9487eeca..66d5cf474d6 100644
--- a/go/vt/wrangler/fake_tablet_test.go
+++ b/go/vt/wrangler/fake_tablet_test.go
@@ -23,6 +23,9 @@ import (
 	"testing"
 	"time"
 
+	vdiff2 "vitess.io/vitess/go/vt/vttablet/tabletmanager/vdiff"
+	"vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv"
+
 	"github.com/stretchr/testify/require"
 	"google.golang.org/grpc"
 
@@ -187,7 +190,7 @@ func (ft *fakeTablet) StartActionLoop(t *testing.T, wr *Wrangler) {
 	ft.Tablet.PortMap["vt"] = vtPort
 	ft.Tablet.PortMap["grpc"] = gRPCPort
 	ft.Tablet.Hostname = "127.0.0.1"
-
+	config := &tabletenv.TabletConfig{}
 	// Create a test tm on that port, and re-read the record
 	// (it has new ports and IP).
 	ft.TM = &tabletmanager.TabletManager{
@@ -196,6 +199,7 @@ func (ft *fakeTablet) StartActionLoop(t *testing.T, wr *Wrangler) {
 		MysqlDaemon:         ft.FakeMysqlDaemon,
 		DBConfigs:           &dbconfigs.DBConfigs{},
 		QueryServiceControl: tabletservermock.NewController(),
+		VDiffEngine:         vdiff2.NewEngine(config, wr.TopoServer(), ft.Tablet),
 	}
 	if err := ft.TM.Start(ft.Tablet, 0); err != nil {
 		t.Fatal(err)