Skip to content

Commit e6ee3af

Browse files
test: added e2e test
Signed-off-by: Harshit Gangal <[email protected]>
1 parent 16f120b commit e6ee3af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

go/test/endtoend/vtgate/queries/orderby/orderby_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ func TestSimpleOrderBy(t *testing.T) {
5353
mcmp.AssertMatches(`SELECT id2 FROM t1 ORDER BY id2 ASC`, `[[INT64(5)] [INT64(6)] [INT64(7)] [INT64(8)] [INT64(9)] [INT64(10)]]`)
5454
}
5555

56+
// TestQueryWithDBQualifier tests that we remove the db qualifier in the plan output that is sent down to the database.
57+
func TestQueryWithDBQualifier(t *testing.T) {
58+
mcmp, closer := start(t)
59+
defer closer()
60+
61+
mcmp.Exec("insert into t1(id1, id2) values (0,10),(1,9),(2,8),(3,7),(4,6),(5,5)")
62+
mcmp.Exec(`SELECT ks_orderby.t1.id1, ks_orderby.t1.id2 FROM ks_orderby.t1 ORDER BY ks_orderby.t1.id2 ASC, ks_orderby.t1.id1 desc`)
63+
}
64+
5665
func TestOrderBy(t *testing.T) {
5766
mcmp, closer := start(t)
5867
defer closer()

0 commit comments

Comments
 (0)