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) {
36
36
migrationContext := & base.MigrationContext {
37
37
InspectorServerInfo : & mysql.ServerInfo {},
38
38
}
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
+ }
40
48
{
41
49
migrationContext .InspectorServerInfo .BinlogFormat = "MINIMAL"
42
- inspector := & Inspector {migrationContext : migrationContext }
43
50
test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
44
51
}
45
52
{
46
53
migrationContext .InspectorServerInfo .BinlogFormat = "MIXED"
47
- inspector := & Inspector {migrationContext : migrationContext }
48
54
test .S (t ).ExpectTrue (inspector .RequiresBinlogFormatChange ())
49
55
}
50
56
{
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 ())
54
59
}
55
60
}
You can’t perform that action at this time.
0 commit comments