Skip to content

Commit

Permalink
test: added e2e fk test for multi target delete
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Mar 18, 2024
1 parent 51debbd commit 7e33223
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions go/test/endtoend/vtgate/foreignkey/fk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,22 @@ func TestFkScenarios(t *testing.T) {
"select * from fk_multicol_t17 order by id",
"select * from fk_multicol_t19 order by id",
},
}, {
name: "Multi Target Delete success",
dataQueries: []string{
"insert into fk_multicol_t15(id, cola, colb) values (1, 7, 1), (2, 9, 1), (3, 11, 1), (4, 13, 1)",
"insert into fk_multicol_t16(id, cola, colb) values (1, 7, 1), (2, 9, 1), (3, 11, 1), (4, 13, 1)",
"insert into fk_multicol_t17(id, cola, colb) values (1, 7, 1), (2, 9, 1), (3, 11, 1)",
"insert into fk_multicol_t18(id, cola, colb) values (1, 7, 1), (3, 11, 1)",
"insert into fk_multicol_t19(id, cola, colb) values (1, 7, 1), (2, 9, 1)",
},
dmlQuery: "delete fk_multicol_t15, fk_multicol_t17 from fk_multicol_t15 join fk_multicol_t17 where fk_multicol_t15.id = fk_multicol_t17.id",
assertionQueries: []string{
"select * from fk_multicol_t15 order by id",
"select * from fk_multicol_t16 order by id",
"select * from fk_multicol_t17 order by id",
"select * from fk_multicol_t19 order by id",
},
}, {
name: "Delete with limit success",
dataQueries: []string{
Expand Down

0 comments on commit 7e33223

Please sign in to comment.