Skip to content

Commit b0680f8

Browse files
authored
fix(tests): fix block body regex in TestChainRPC (#2805)
1 parent 78a1dbd commit b0680f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/rpc/rpc_03-chain_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,14 @@ func TestChainRPC(t *testing.T) {
102102
}
103103
block.Block.Header.Digest.Logs = nil
104104
assert.Len(t, block.Block.Body, 1)
105-
const bodyRegex = `^0x280403000b[0-9a-z]{8}8201$`
105+
const bodyRegex = "^0x" +
106+
"28" + // base 10
107+
"04" + // not signed extrinsic of the 4th extrinsic version
108+
"03" + // pallet index enum
109+
"00" + // call index enum
110+
// Extrinsic argument
111+
"0b" + // 0b0000_1011 big int
112+
"[0-9a-z]{12}$"
106113
assert.Regexp(t, bodyRegex, block.Block.Body[0])
107114
block.Block.Body = nil
108115

0 commit comments

Comments
 (0)