Skip to content

Commit

Permalink
Add basic test
Browse files Browse the repository at this point in the history
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
  • Loading branch information
dbussink committed Feb 18, 2024
1 parent 939de97 commit 241d5f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/vt/vtexplain/vtexplain_vttablet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ create table t2 (
require.NoError(t, err)
defer vte.Stop()

// Check if the correct schema query is registered.
_, found := vte.globalTabletEnv.schemaQueries["SELECT COLUMN_NAME as column_name\n\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\tWHERE TABLE_SCHEMA = database() AND TABLE_NAME = 't1'\n\t\tORDER BY ORDINAL_POSITION"]
assert.True(t, found)

sql := "SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.id"

_, err = vte.Run(sql)
Expand Down

0 comments on commit 241d5f5

Please sign in to comment.