From 140cf3401f97e8f36f5ff79de140dab7dc3f5fea Mon Sep 17 00:00:00 2001 From: kevinssgh Date: Mon, 15 Apr 2024 13:39:25 -0400 Subject: [PATCH] fix test case --- zetaclient/bitcoin/bitcoin_client_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zetaclient/bitcoin/bitcoin_client_test.go b/zetaclient/bitcoin/bitcoin_client_test.go index dfa576c9c1..83a7e38b3c 100644 --- a/zetaclient/bitcoin/bitcoin_client_test.go +++ b/zetaclient/bitcoin/bitcoin_client_test.go @@ -3,6 +3,7 @@ package bitcoin import ( "bytes" "encoding/hex" + "errors" "math" "math/big" "path" @@ -479,6 +480,7 @@ func TestGetSenderAddressByVinErrors(t *testing.T) { t.Run("should return error when RPC client fails to get raw tx", func(t *testing.T) { // create mock rpc client without preloaded tx rpcClient := stub.NewMockBTCRPCClient() + rpcClient.WithError(errors.New("no transaction found")) txVin := btcjson.Vin{Txid: txHash, Vout: 2} sender, err := GetSenderAddressByVin(rpcClient, txVin, net) require.ErrorContains(t, err, "error getting raw transaction")