Skip to content

Commit

Permalink
fix(tests): fix block body regex in TestChainRPC (#2805)
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Sep 7, 2022
1 parent 78a1dbd commit b0680f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/rpc/rpc_03-chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ func TestChainRPC(t *testing.T) {
}
block.Block.Header.Digest.Logs = nil
assert.Len(t, block.Block.Body, 1)
const bodyRegex = `^0x280403000b[0-9a-z]{8}8201$`
const bodyRegex = "^0x" +
"28" + // base 10
"04" + // not signed extrinsic of the 4th extrinsic version
"03" + // pallet index enum
"00" + // call index enum
// Extrinsic argument
"0b" + // 0b0000_1011 big int
"[0-9a-z]{12}$"
assert.Regexp(t, bodyRegex, block.Block.Body[0])
block.Block.Body = nil

Expand Down

0 comments on commit b0680f8

Please sign in to comment.