Skip to content

Commit

Permalink
add tests for shard backend responses
Browse files Browse the repository at this point in the history
  • Loading branch information
pirtleshell committed Mar 4, 2024
1 parent 5a9f4c4 commit 3c53de9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,18 @@ func TestE2ETest_HeightBasedRouting(t *testing.T) {
params: []interface{}{"0x15", false}, // block 21 is beyond shards
expectRoute: service.ResponseBackendDefault,
},
{
name: "request for height in 1st shard -> shard",
method: "eth_getBlockByNumber",
params: []interface{}{"0x2", false}, // block 2
expectRoute: service.ResponseBackendShard,
},
{
name: "request for height in 2nd shard -> shard",
method: "eth_getBlockByNumber",
params: []interface{}{"0xF", false}, // block 15
expectRoute: service.ResponseBackendShard,
},
{
name: "request for earliest height -> default",
method: "eth_getBlockByNumber",
Expand Down

0 comments on commit 3c53de9

Please sign in to comment.