Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Oct 18, 2024
1 parent b821f9d commit 4c779fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/elasticproc/transactions/serialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestTxsDatabaseProcessor_SerializeTransactionWithRefund(t *testing.T) {
require.Nil(t, err)

expectedBuff := `{"update":{ "_index":"transactions","_id":"txHash"}}
{"scripted_upsert": true, "script": {"source": "if ('create' == ctx.op) {ctx.op = 'noop'} else {ctx._source.fee = params.fee;ctx._source.feeNum = params.feeNum;ctx._source.gasUsed = params.gasUsed;}","lang": "painless","params": {"fee": "100000", "gasUsed": 5000, "feeNum": 5e-15}},"upsert": {}}
{"scripted_upsert": true, "script": {"source": "if ('create' == ctx.op) {ctx.op = 'noop'} else {ctx._source.fee = params.fee;ctx._source.feeNum = params.feeNum;ctx._source.gasUsed = params.gasUsed;}","lang": "painless","params": {"fee": "100000", "gasUsed": 5000, "feeNum": 5e-15, "gasRefunded": 0}},"upsert": {}}
`
require.Equal(t, expectedBuff, buffSlice.Buffers()[0].String())
}

0 comments on commit 4c779fe

Please sign in to comment.