File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,25 @@ func TestRequiresBinlogFormatChange(t *testing.T) {
3636 migrationContext := & base.MigrationContext {
3737 InspectorServerInfo : & mysql.ServerInfo {},
3838 }
39-
39+ inspector := & Inspector {migrationContext : migrationContext }
40+ {
41+ migrationContext .InspectorServerInfo .BinlogFormat = "ROW"
42+ test .S (t ).ExpectFalse (inspector .RequiresBinlogFormatChange ())
43+ }
44+ {
45+ migrationContext .InspectorServerInfo .BinlogFormat = ""
46+ test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
47+ }
4048 {
4149 migrationContext .InspectorServerInfo .BinlogFormat = "MINIMAL"
42- inspector := & Inspector {migrationContext : migrationContext }
4350 test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
4451 }
4552 {
4653 migrationContext .InspectorServerInfo .BinlogFormat = "MIXED"
47- inspector := & Inspector {migrationContext : migrationContext }
4854 test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
4955 }
5056 {
51- migrationContext .InspectorServerInfo .BinlogFormat = "ROW"
52- inspector := & Inspector {migrationContext : migrationContext }
53- test .S (t ).ExpectFalse (inspector .RequiresBinlogFormatChange ())
57+ migrationContext .InspectorServerInfo = nil
58+ test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
5459 }
5560}
You can’t perform that action at this time.
0 commit comments