From 4c779fec382479d1e5421ae0cafde8aa00b77511 Mon Sep 17 00:00:00 2001 From: miiu Date: Fri, 18 Oct 2024 10:04:19 +0300 Subject: [PATCH] fix unit test --- process/elasticproc/transactions/serialize_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/elasticproc/transactions/serialize_test.go b/process/elasticproc/transactions/serialize_test.go index 1565ee2d..b4e2bf96 100644 --- a/process/elasticproc/transactions/serialize_test.go +++ b/process/elasticproc/transactions/serialize_test.go @@ -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()) }