Skip to content

Commit

Permalink
added end-to-end testcase support for filter_cases
Browse files Browse the repository at this point in the history
Signed-off-by: c-r-dev <[email protected]>
  • Loading branch information
c-r-dev committed Dec 14, 2024
1 parent d2590a8 commit f4a578c
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 70 deletions.
19 changes: 19 additions & 0 deletions go/test/endtoend/vtgate/plan_tests/plan_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,22 @@ func TestSelectCases(t *testing.T) {
})
}
}

func TestFilterCases(t *testing.T) {
mcmp, closer := start(t)
defer closer()
tests := readJSONTests("filter_cases.json")
for _, test := range tests {
mcmp.Run(test.Comment, func(mcmp *utils.MySQLCompare) {
if test.SkipE2E {
mcmp.AsT().Skip(test.Query)
}
mcmp.Exec(test.Query)
pd := utils.ExecTrace(mcmp.AsT(), mcmp.VtConn, test.Query)
verifyTestExpectations(mcmp.AsT(), pd, test)
if mcmp.VtConn.IsClosed() {
mcmp.AsT().Fatal("vtgate connection is closed")
}
})
}
}
Loading

0 comments on commit f4a578c

Please sign in to comment.