Skip to content

Commit

Permalink
Add test for non-existent table on the receiving shard to mover featu…
Browse files Browse the repository at this point in the history
…re tests
  • Loading branch information
EinKrebs committed Mar 25, 2024
1 parent a2d361a commit 07e5686
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions test/feature/features/move.feature
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,38 @@ Feature: Move test
"""
failed to fetch key range at /keyranges/krid3
"""

Scenario: Move fails when table does not exist on receiver
When I run SQL on host "shard1"
"""
CREATE TABLE xMove(w_id INT, s TEXT);
insert into xMove(w_id, s) values(1, '001');
"""
Then command return code should be "0"
When I run SQL on host "shard2"
"""
SELECT * FROM xMove
"""
Then command return code should be "1"
And SQL error on host "shard2" should match regexp
"""
relation .* does not exist
"""
When I run SQL on host "shard1"
"""
SELECT * FROM xMove
"""
Then command return code should be "0"
And SQL result should match regexp
"""
001
"""
When I run SQL on host "coordinator"
"""
MOVE KEY RANGE krid1 to sh2
"""
Then command return code should be "1"
And SQL error on host "coordinator" should match regexp
"""
relation xMove does not exist on receiving shard
"""

0 comments on commit 07e5686

Please sign in to comment.