diff --git a/changelog.md b/changelog.md index f0f94999ef..82d90197d2 100644 --- a/changelog.md +++ b/changelog.md @@ -39,6 +39,7 @@ * [2262](https://github.com/zeta-chain/node/pull/2262) - refactor MsgUpdateZRC20 into MsgPauseZrc20 and MsgUnPauseZRC20 * [2290](https://github.com/zeta-chain/node/pull/2290) - rename `MsgAddBlameVote` message to `MsgVoteBlame` * [2269](https://github.com/zeta-chain/node/pull/2269) - refactor MsgUpdateCrosschainFlags into MsgEnableCCTX, MsgDisableCCTX and MsgUpdateGasPriceIncreaseFlags +* [2296](https://github.com/zeta-chain/node/pull/2296) - move `testdata` package to `testutil` to organize test-related utilities ### Tests diff --git a/pkg/proofs/bitcoin/proof_test.go b/pkg/proofs/bitcoin/proof_test.go index 23444e22d6..ad9801f6ce 100644 --- a/pkg/proofs/bitcoin/proof_test.go +++ b/pkg/proofs/bitcoin/proof_test.go @@ -13,7 +13,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" ) func TestBitcoinMerkleProof(t *testing.T) { diff --git a/pkg/proofs/ethereum/proof_test.go b/pkg/proofs/ethereum/proof_test.go index b6c676b0ee..8fb67c591b 100644 --- a/pkg/proofs/ethereum/proof_test.go +++ b/pkg/proofs/ethereum/proof_test.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" ) func TestProofGeneration(t *testing.T) { diff --git a/pkg/proofs/headers_test.go b/pkg/proofs/headers_test.go index 5d992a4686..8125435878 100644 --- a/pkg/proofs/headers_test.go +++ b/pkg/proofs/headers_test.go @@ -17,7 +17,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" ) const numHeadersToTest = 100 @@ -25,7 +25,7 @@ const numHeadersToTest = 100 func TestTrueEthereumHeader(t *testing.T) { var header ethtypes.Header // read file into a byte slice - file, err := os.Open("../testdata/eth_header_18495266.json") + file, err := os.Open("../../testutil/testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) @@ -52,7 +52,7 @@ func TestTrueEthereumHeader(t *testing.T) { func TestFalseEthereumHeader(t *testing.T) { var header ethtypes.Header // read file into a byte slice - file, err := os.Open("../testdata/eth_header_18495266.json") + file, err := os.Open("../../testutil/testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) diff --git a/pkg/proofs/proof_test.go b/pkg/proofs/proof_test.go index b9210e9260..7be25350f4 100644 --- a/pkg/proofs/proof_test.go +++ b/pkg/proofs/proof_test.go @@ -18,7 +18,7 @@ import ( "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" ) const ( diff --git a/testutil/sample/lightclient.go b/testutil/sample/lightclient.go index 1d3725876a..70aa55b51a 100644 --- a/testutil/sample/lightclient.go +++ b/testutil/sample/lightclient.go @@ -11,7 +11,7 @@ import ( "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" lightclienttypes "github.com/zeta-chain/zetacore/x/lightclient/types" ) diff --git a/pkg/testdata/eth_header_18495266.json b/testutil/testdata/eth_header_18495266.json similarity index 100% rename from pkg/testdata/eth_header_18495266.json rename to testutil/testdata/eth_header_18495266.json diff --git a/pkg/testdata/ethereum/header.json b/testutil/testdata/ethereum/header.json similarity index 100% rename from pkg/testdata/ethereum/header.json rename to testutil/testdata/ethereum/header.json diff --git a/pkg/testdata/ethereum/receipt_0.json b/testutil/testdata/ethereum/receipt_0.json similarity index 100% rename from pkg/testdata/ethereum/receipt_0.json rename to testutil/testdata/ethereum/receipt_0.json diff --git a/pkg/testdata/ethereum/receipt_1.json b/testutil/testdata/ethereum/receipt_1.json similarity index 100% rename from pkg/testdata/ethereum/receipt_1.json rename to testutil/testdata/ethereum/receipt_1.json diff --git a/pkg/testdata/ethereum/receipt_10.json b/testutil/testdata/ethereum/receipt_10.json similarity index 100% rename from pkg/testdata/ethereum/receipt_10.json rename to testutil/testdata/ethereum/receipt_10.json diff --git a/pkg/testdata/ethereum/receipt_11.json b/testutil/testdata/ethereum/receipt_11.json similarity index 100% rename from pkg/testdata/ethereum/receipt_11.json rename to testutil/testdata/ethereum/receipt_11.json diff --git a/pkg/testdata/ethereum/receipt_12.json b/testutil/testdata/ethereum/receipt_12.json similarity index 100% rename from pkg/testdata/ethereum/receipt_12.json rename to testutil/testdata/ethereum/receipt_12.json diff --git a/pkg/testdata/ethereum/receipt_13.json b/testutil/testdata/ethereum/receipt_13.json similarity index 100% rename from pkg/testdata/ethereum/receipt_13.json rename to testutil/testdata/ethereum/receipt_13.json diff --git a/pkg/testdata/ethereum/receipt_14.json b/testutil/testdata/ethereum/receipt_14.json similarity index 100% rename from pkg/testdata/ethereum/receipt_14.json rename to testutil/testdata/ethereum/receipt_14.json diff --git a/pkg/testdata/ethereum/receipt_15.json b/testutil/testdata/ethereum/receipt_15.json similarity index 100% rename from pkg/testdata/ethereum/receipt_15.json rename to testutil/testdata/ethereum/receipt_15.json diff --git a/pkg/testdata/ethereum/receipt_16.json b/testutil/testdata/ethereum/receipt_16.json similarity index 100% rename from pkg/testdata/ethereum/receipt_16.json rename to testutil/testdata/ethereum/receipt_16.json diff --git a/pkg/testdata/ethereum/receipt_17.json b/testutil/testdata/ethereum/receipt_17.json similarity index 100% rename from pkg/testdata/ethereum/receipt_17.json rename to testutil/testdata/ethereum/receipt_17.json diff --git a/pkg/testdata/ethereum/receipt_18.json b/testutil/testdata/ethereum/receipt_18.json similarity index 100% rename from pkg/testdata/ethereum/receipt_18.json rename to testutil/testdata/ethereum/receipt_18.json diff --git a/pkg/testdata/ethereum/receipt_19.json b/testutil/testdata/ethereum/receipt_19.json similarity index 100% rename from pkg/testdata/ethereum/receipt_19.json rename to testutil/testdata/ethereum/receipt_19.json diff --git a/pkg/testdata/ethereum/receipt_2.json b/testutil/testdata/ethereum/receipt_2.json similarity index 100% rename from pkg/testdata/ethereum/receipt_2.json rename to testutil/testdata/ethereum/receipt_2.json diff --git a/pkg/testdata/ethereum/receipt_20.json b/testutil/testdata/ethereum/receipt_20.json similarity index 100% rename from pkg/testdata/ethereum/receipt_20.json rename to testutil/testdata/ethereum/receipt_20.json diff --git a/pkg/testdata/ethereum/receipt_21.json b/testutil/testdata/ethereum/receipt_21.json similarity index 100% rename from pkg/testdata/ethereum/receipt_21.json rename to testutil/testdata/ethereum/receipt_21.json diff --git a/pkg/testdata/ethereum/receipt_22.json b/testutil/testdata/ethereum/receipt_22.json similarity index 100% rename from pkg/testdata/ethereum/receipt_22.json rename to testutil/testdata/ethereum/receipt_22.json diff --git a/pkg/testdata/ethereum/receipt_23.json b/testutil/testdata/ethereum/receipt_23.json similarity index 100% rename from pkg/testdata/ethereum/receipt_23.json rename to testutil/testdata/ethereum/receipt_23.json diff --git a/pkg/testdata/ethereum/receipt_24.json b/testutil/testdata/ethereum/receipt_24.json similarity index 100% rename from pkg/testdata/ethereum/receipt_24.json rename to testutil/testdata/ethereum/receipt_24.json diff --git a/pkg/testdata/ethereum/receipt_25.json b/testutil/testdata/ethereum/receipt_25.json similarity index 100% rename from pkg/testdata/ethereum/receipt_25.json rename to testutil/testdata/ethereum/receipt_25.json diff --git a/pkg/testdata/ethereum/receipt_26.json b/testutil/testdata/ethereum/receipt_26.json similarity index 100% rename from pkg/testdata/ethereum/receipt_26.json rename to testutil/testdata/ethereum/receipt_26.json diff --git a/pkg/testdata/ethereum/receipt_27.json b/testutil/testdata/ethereum/receipt_27.json similarity index 100% rename from pkg/testdata/ethereum/receipt_27.json rename to testutil/testdata/ethereum/receipt_27.json diff --git a/pkg/testdata/ethereum/receipt_28.json b/testutil/testdata/ethereum/receipt_28.json similarity index 100% rename from pkg/testdata/ethereum/receipt_28.json rename to testutil/testdata/ethereum/receipt_28.json diff --git a/pkg/testdata/ethereum/receipt_29.json b/testutil/testdata/ethereum/receipt_29.json similarity index 100% rename from pkg/testdata/ethereum/receipt_29.json rename to testutil/testdata/ethereum/receipt_29.json diff --git a/pkg/testdata/ethereum/receipt_3.json b/testutil/testdata/ethereum/receipt_3.json similarity index 100% rename from pkg/testdata/ethereum/receipt_3.json rename to testutil/testdata/ethereum/receipt_3.json diff --git a/pkg/testdata/ethereum/receipt_30.json b/testutil/testdata/ethereum/receipt_30.json similarity index 100% rename from pkg/testdata/ethereum/receipt_30.json rename to testutil/testdata/ethereum/receipt_30.json diff --git a/pkg/testdata/ethereum/receipt_31.json b/testutil/testdata/ethereum/receipt_31.json similarity index 100% rename from pkg/testdata/ethereum/receipt_31.json rename to testutil/testdata/ethereum/receipt_31.json diff --git a/pkg/testdata/ethereum/receipt_32.json b/testutil/testdata/ethereum/receipt_32.json similarity index 100% rename from pkg/testdata/ethereum/receipt_32.json rename to testutil/testdata/ethereum/receipt_32.json diff --git a/pkg/testdata/ethereum/receipt_33.json b/testutil/testdata/ethereum/receipt_33.json similarity index 100% rename from pkg/testdata/ethereum/receipt_33.json rename to testutil/testdata/ethereum/receipt_33.json diff --git a/pkg/testdata/ethereum/receipt_34.json b/testutil/testdata/ethereum/receipt_34.json similarity index 100% rename from pkg/testdata/ethereum/receipt_34.json rename to testutil/testdata/ethereum/receipt_34.json diff --git a/pkg/testdata/ethereum/receipt_35.json b/testutil/testdata/ethereum/receipt_35.json similarity index 100% rename from pkg/testdata/ethereum/receipt_35.json rename to testutil/testdata/ethereum/receipt_35.json diff --git a/pkg/testdata/ethereum/receipt_36.json b/testutil/testdata/ethereum/receipt_36.json similarity index 100% rename from pkg/testdata/ethereum/receipt_36.json rename to testutil/testdata/ethereum/receipt_36.json diff --git a/pkg/testdata/ethereum/receipt_37.json b/testutil/testdata/ethereum/receipt_37.json similarity index 100% rename from pkg/testdata/ethereum/receipt_37.json rename to testutil/testdata/ethereum/receipt_37.json diff --git a/pkg/testdata/ethereum/receipt_38.json b/testutil/testdata/ethereum/receipt_38.json similarity index 100% rename from pkg/testdata/ethereum/receipt_38.json rename to testutil/testdata/ethereum/receipt_38.json diff --git a/pkg/testdata/ethereum/receipt_39.json b/testutil/testdata/ethereum/receipt_39.json similarity index 100% rename from pkg/testdata/ethereum/receipt_39.json rename to testutil/testdata/ethereum/receipt_39.json diff --git a/pkg/testdata/ethereum/receipt_4.json b/testutil/testdata/ethereum/receipt_4.json similarity index 100% rename from pkg/testdata/ethereum/receipt_4.json rename to testutil/testdata/ethereum/receipt_4.json diff --git a/pkg/testdata/ethereum/receipt_40.json b/testutil/testdata/ethereum/receipt_40.json similarity index 100% rename from pkg/testdata/ethereum/receipt_40.json rename to testutil/testdata/ethereum/receipt_40.json diff --git a/pkg/testdata/ethereum/receipt_41.json b/testutil/testdata/ethereum/receipt_41.json similarity index 100% rename from pkg/testdata/ethereum/receipt_41.json rename to testutil/testdata/ethereum/receipt_41.json diff --git a/pkg/testdata/ethereum/receipt_42.json b/testutil/testdata/ethereum/receipt_42.json similarity index 100% rename from pkg/testdata/ethereum/receipt_42.json rename to testutil/testdata/ethereum/receipt_42.json diff --git a/pkg/testdata/ethereum/receipt_43.json b/testutil/testdata/ethereum/receipt_43.json similarity index 100% rename from pkg/testdata/ethereum/receipt_43.json rename to testutil/testdata/ethereum/receipt_43.json diff --git a/pkg/testdata/ethereum/receipt_44.json b/testutil/testdata/ethereum/receipt_44.json similarity index 100% rename from pkg/testdata/ethereum/receipt_44.json rename to testutil/testdata/ethereum/receipt_44.json diff --git a/pkg/testdata/ethereum/receipt_45.json b/testutil/testdata/ethereum/receipt_45.json similarity index 100% rename from pkg/testdata/ethereum/receipt_45.json rename to testutil/testdata/ethereum/receipt_45.json diff --git a/pkg/testdata/ethereum/receipt_46.json b/testutil/testdata/ethereum/receipt_46.json similarity index 100% rename from pkg/testdata/ethereum/receipt_46.json rename to testutil/testdata/ethereum/receipt_46.json diff --git a/pkg/testdata/ethereum/receipt_47.json b/testutil/testdata/ethereum/receipt_47.json similarity index 100% rename from pkg/testdata/ethereum/receipt_47.json rename to testutil/testdata/ethereum/receipt_47.json diff --git a/pkg/testdata/ethereum/receipt_48.json b/testutil/testdata/ethereum/receipt_48.json similarity index 100% rename from pkg/testdata/ethereum/receipt_48.json rename to testutil/testdata/ethereum/receipt_48.json diff --git a/pkg/testdata/ethereum/receipt_49.json b/testutil/testdata/ethereum/receipt_49.json similarity index 100% rename from pkg/testdata/ethereum/receipt_49.json rename to testutil/testdata/ethereum/receipt_49.json diff --git a/pkg/testdata/ethereum/receipt_5.json b/testutil/testdata/ethereum/receipt_5.json similarity index 100% rename from pkg/testdata/ethereum/receipt_5.json rename to testutil/testdata/ethereum/receipt_5.json diff --git a/pkg/testdata/ethereum/receipt_50.json b/testutil/testdata/ethereum/receipt_50.json similarity index 100% rename from pkg/testdata/ethereum/receipt_50.json rename to testutil/testdata/ethereum/receipt_50.json diff --git a/pkg/testdata/ethereum/receipt_51.json b/testutil/testdata/ethereum/receipt_51.json similarity index 100% rename from pkg/testdata/ethereum/receipt_51.json rename to testutil/testdata/ethereum/receipt_51.json diff --git a/pkg/testdata/ethereum/receipt_52.json b/testutil/testdata/ethereum/receipt_52.json similarity index 100% rename from pkg/testdata/ethereum/receipt_52.json rename to testutil/testdata/ethereum/receipt_52.json diff --git a/pkg/testdata/ethereum/receipt_53.json b/testutil/testdata/ethereum/receipt_53.json similarity index 100% rename from pkg/testdata/ethereum/receipt_53.json rename to testutil/testdata/ethereum/receipt_53.json diff --git a/pkg/testdata/ethereum/receipt_54.json b/testutil/testdata/ethereum/receipt_54.json similarity index 100% rename from pkg/testdata/ethereum/receipt_54.json rename to testutil/testdata/ethereum/receipt_54.json diff --git a/pkg/testdata/ethereum/receipt_55.json b/testutil/testdata/ethereum/receipt_55.json similarity index 100% rename from pkg/testdata/ethereum/receipt_55.json rename to testutil/testdata/ethereum/receipt_55.json diff --git a/pkg/testdata/ethereum/receipt_56.json b/testutil/testdata/ethereum/receipt_56.json similarity index 100% rename from pkg/testdata/ethereum/receipt_56.json rename to testutil/testdata/ethereum/receipt_56.json diff --git a/pkg/testdata/ethereum/receipt_57.json b/testutil/testdata/ethereum/receipt_57.json similarity index 100% rename from pkg/testdata/ethereum/receipt_57.json rename to testutil/testdata/ethereum/receipt_57.json diff --git a/pkg/testdata/ethereum/receipt_58.json b/testutil/testdata/ethereum/receipt_58.json similarity index 100% rename from pkg/testdata/ethereum/receipt_58.json rename to testutil/testdata/ethereum/receipt_58.json diff --git a/pkg/testdata/ethereum/receipt_59.json b/testutil/testdata/ethereum/receipt_59.json similarity index 100% rename from pkg/testdata/ethereum/receipt_59.json rename to testutil/testdata/ethereum/receipt_59.json diff --git a/pkg/testdata/ethereum/receipt_6.json b/testutil/testdata/ethereum/receipt_6.json similarity index 100% rename from pkg/testdata/ethereum/receipt_6.json rename to testutil/testdata/ethereum/receipt_6.json diff --git a/pkg/testdata/ethereum/receipt_60.json b/testutil/testdata/ethereum/receipt_60.json similarity index 100% rename from pkg/testdata/ethereum/receipt_60.json rename to testutil/testdata/ethereum/receipt_60.json diff --git a/pkg/testdata/ethereum/receipt_61.json b/testutil/testdata/ethereum/receipt_61.json similarity index 100% rename from pkg/testdata/ethereum/receipt_61.json rename to testutil/testdata/ethereum/receipt_61.json diff --git a/pkg/testdata/ethereum/receipt_62.json b/testutil/testdata/ethereum/receipt_62.json similarity index 100% rename from pkg/testdata/ethereum/receipt_62.json rename to testutil/testdata/ethereum/receipt_62.json diff --git a/pkg/testdata/ethereum/receipt_63.json b/testutil/testdata/ethereum/receipt_63.json similarity index 100% rename from pkg/testdata/ethereum/receipt_63.json rename to testutil/testdata/ethereum/receipt_63.json diff --git a/pkg/testdata/ethereum/receipt_64.json b/testutil/testdata/ethereum/receipt_64.json similarity index 100% rename from pkg/testdata/ethereum/receipt_64.json rename to testutil/testdata/ethereum/receipt_64.json diff --git a/pkg/testdata/ethereum/receipt_65.json b/testutil/testdata/ethereum/receipt_65.json similarity index 100% rename from pkg/testdata/ethereum/receipt_65.json rename to testutil/testdata/ethereum/receipt_65.json diff --git a/pkg/testdata/ethereum/receipt_66.json b/testutil/testdata/ethereum/receipt_66.json similarity index 100% rename from pkg/testdata/ethereum/receipt_66.json rename to testutil/testdata/ethereum/receipt_66.json diff --git a/pkg/testdata/ethereum/receipt_67.json b/testutil/testdata/ethereum/receipt_67.json similarity index 100% rename from pkg/testdata/ethereum/receipt_67.json rename to testutil/testdata/ethereum/receipt_67.json diff --git a/pkg/testdata/ethereum/receipt_68.json b/testutil/testdata/ethereum/receipt_68.json similarity index 100% rename from pkg/testdata/ethereum/receipt_68.json rename to testutil/testdata/ethereum/receipt_68.json diff --git a/pkg/testdata/ethereum/receipt_69.json b/testutil/testdata/ethereum/receipt_69.json similarity index 100% rename from pkg/testdata/ethereum/receipt_69.json rename to testutil/testdata/ethereum/receipt_69.json diff --git a/pkg/testdata/ethereum/receipt_7.json b/testutil/testdata/ethereum/receipt_7.json similarity index 100% rename from pkg/testdata/ethereum/receipt_7.json rename to testutil/testdata/ethereum/receipt_7.json diff --git a/pkg/testdata/ethereum/receipt_70.json b/testutil/testdata/ethereum/receipt_70.json similarity index 100% rename from pkg/testdata/ethereum/receipt_70.json rename to testutil/testdata/ethereum/receipt_70.json diff --git a/pkg/testdata/ethereum/receipt_71.json b/testutil/testdata/ethereum/receipt_71.json similarity index 100% rename from pkg/testdata/ethereum/receipt_71.json rename to testutil/testdata/ethereum/receipt_71.json diff --git a/pkg/testdata/ethereum/receipt_72.json b/testutil/testdata/ethereum/receipt_72.json similarity index 100% rename from pkg/testdata/ethereum/receipt_72.json rename to testutil/testdata/ethereum/receipt_72.json diff --git a/pkg/testdata/ethereum/receipt_73.json b/testutil/testdata/ethereum/receipt_73.json similarity index 100% rename from pkg/testdata/ethereum/receipt_73.json rename to testutil/testdata/ethereum/receipt_73.json diff --git a/pkg/testdata/ethereum/receipt_74.json b/testutil/testdata/ethereum/receipt_74.json similarity index 100% rename from pkg/testdata/ethereum/receipt_74.json rename to testutil/testdata/ethereum/receipt_74.json diff --git a/pkg/testdata/ethereum/receipt_75.json b/testutil/testdata/ethereum/receipt_75.json similarity index 100% rename from pkg/testdata/ethereum/receipt_75.json rename to testutil/testdata/ethereum/receipt_75.json diff --git a/pkg/testdata/ethereum/receipt_76.json b/testutil/testdata/ethereum/receipt_76.json similarity index 100% rename from pkg/testdata/ethereum/receipt_76.json rename to testutil/testdata/ethereum/receipt_76.json diff --git a/pkg/testdata/ethereum/receipt_77.json b/testutil/testdata/ethereum/receipt_77.json similarity index 100% rename from pkg/testdata/ethereum/receipt_77.json rename to testutil/testdata/ethereum/receipt_77.json diff --git a/pkg/testdata/ethereum/receipt_78.json b/testutil/testdata/ethereum/receipt_78.json similarity index 100% rename from pkg/testdata/ethereum/receipt_78.json rename to testutil/testdata/ethereum/receipt_78.json diff --git a/pkg/testdata/ethereum/receipt_79.json b/testutil/testdata/ethereum/receipt_79.json similarity index 100% rename from pkg/testdata/ethereum/receipt_79.json rename to testutil/testdata/ethereum/receipt_79.json diff --git a/pkg/testdata/ethereum/receipt_8.json b/testutil/testdata/ethereum/receipt_8.json similarity index 100% rename from pkg/testdata/ethereum/receipt_8.json rename to testutil/testdata/ethereum/receipt_8.json diff --git a/pkg/testdata/ethereum/receipt_80.json b/testutil/testdata/ethereum/receipt_80.json similarity index 100% rename from pkg/testdata/ethereum/receipt_80.json rename to testutil/testdata/ethereum/receipt_80.json diff --git a/pkg/testdata/ethereum/receipt_9.json b/testutil/testdata/ethereum/receipt_9.json similarity index 100% rename from pkg/testdata/ethereum/receipt_9.json rename to testutil/testdata/ethereum/receipt_9.json diff --git a/pkg/testdata/ethereum/tx_0.json b/testutil/testdata/ethereum/tx_0.json similarity index 100% rename from pkg/testdata/ethereum/tx_0.json rename to testutil/testdata/ethereum/tx_0.json diff --git a/pkg/testdata/ethereum/tx_1.json b/testutil/testdata/ethereum/tx_1.json similarity index 100% rename from pkg/testdata/ethereum/tx_1.json rename to testutil/testdata/ethereum/tx_1.json diff --git a/pkg/testdata/ethereum/tx_10.json b/testutil/testdata/ethereum/tx_10.json similarity index 100% rename from pkg/testdata/ethereum/tx_10.json rename to testutil/testdata/ethereum/tx_10.json diff --git a/pkg/testdata/ethereum/tx_11.json b/testutil/testdata/ethereum/tx_11.json similarity index 100% rename from pkg/testdata/ethereum/tx_11.json rename to testutil/testdata/ethereum/tx_11.json diff --git a/pkg/testdata/ethereum/tx_12.json b/testutil/testdata/ethereum/tx_12.json similarity index 100% rename from pkg/testdata/ethereum/tx_12.json rename to testutil/testdata/ethereum/tx_12.json diff --git a/pkg/testdata/ethereum/tx_13.json b/testutil/testdata/ethereum/tx_13.json similarity index 100% rename from pkg/testdata/ethereum/tx_13.json rename to testutil/testdata/ethereum/tx_13.json diff --git a/pkg/testdata/ethereum/tx_14.json b/testutil/testdata/ethereum/tx_14.json similarity index 100% rename from pkg/testdata/ethereum/tx_14.json rename to testutil/testdata/ethereum/tx_14.json diff --git a/pkg/testdata/ethereum/tx_15.json b/testutil/testdata/ethereum/tx_15.json similarity index 100% rename from pkg/testdata/ethereum/tx_15.json rename to testutil/testdata/ethereum/tx_15.json diff --git a/pkg/testdata/ethereum/tx_16.json b/testutil/testdata/ethereum/tx_16.json similarity index 100% rename from pkg/testdata/ethereum/tx_16.json rename to testutil/testdata/ethereum/tx_16.json diff --git a/pkg/testdata/ethereum/tx_17.json b/testutil/testdata/ethereum/tx_17.json similarity index 100% rename from pkg/testdata/ethereum/tx_17.json rename to testutil/testdata/ethereum/tx_17.json diff --git a/pkg/testdata/ethereum/tx_18.json b/testutil/testdata/ethereum/tx_18.json similarity index 100% rename from pkg/testdata/ethereum/tx_18.json rename to testutil/testdata/ethereum/tx_18.json diff --git a/pkg/testdata/ethereum/tx_19.json b/testutil/testdata/ethereum/tx_19.json similarity index 100% rename from pkg/testdata/ethereum/tx_19.json rename to testutil/testdata/ethereum/tx_19.json diff --git a/pkg/testdata/ethereum/tx_2.json b/testutil/testdata/ethereum/tx_2.json similarity index 100% rename from pkg/testdata/ethereum/tx_2.json rename to testutil/testdata/ethereum/tx_2.json diff --git a/pkg/testdata/ethereum/tx_20.json b/testutil/testdata/ethereum/tx_20.json similarity index 100% rename from pkg/testdata/ethereum/tx_20.json rename to testutil/testdata/ethereum/tx_20.json diff --git a/pkg/testdata/ethereum/tx_21.json b/testutil/testdata/ethereum/tx_21.json similarity index 100% rename from pkg/testdata/ethereum/tx_21.json rename to testutil/testdata/ethereum/tx_21.json diff --git a/pkg/testdata/ethereum/tx_22.json b/testutil/testdata/ethereum/tx_22.json similarity index 100% rename from pkg/testdata/ethereum/tx_22.json rename to testutil/testdata/ethereum/tx_22.json diff --git a/pkg/testdata/ethereum/tx_23.json b/testutil/testdata/ethereum/tx_23.json similarity index 100% rename from pkg/testdata/ethereum/tx_23.json rename to testutil/testdata/ethereum/tx_23.json diff --git a/pkg/testdata/ethereum/tx_24.json b/testutil/testdata/ethereum/tx_24.json similarity index 100% rename from pkg/testdata/ethereum/tx_24.json rename to testutil/testdata/ethereum/tx_24.json diff --git a/pkg/testdata/ethereum/tx_25.json b/testutil/testdata/ethereum/tx_25.json similarity index 100% rename from pkg/testdata/ethereum/tx_25.json rename to testutil/testdata/ethereum/tx_25.json diff --git a/pkg/testdata/ethereum/tx_26.json b/testutil/testdata/ethereum/tx_26.json similarity index 100% rename from pkg/testdata/ethereum/tx_26.json rename to testutil/testdata/ethereum/tx_26.json diff --git a/pkg/testdata/ethereum/tx_27.json b/testutil/testdata/ethereum/tx_27.json similarity index 100% rename from pkg/testdata/ethereum/tx_27.json rename to testutil/testdata/ethereum/tx_27.json diff --git a/pkg/testdata/ethereum/tx_28.json b/testutil/testdata/ethereum/tx_28.json similarity index 100% rename from pkg/testdata/ethereum/tx_28.json rename to testutil/testdata/ethereum/tx_28.json diff --git a/pkg/testdata/ethereum/tx_29.json b/testutil/testdata/ethereum/tx_29.json similarity index 100% rename from pkg/testdata/ethereum/tx_29.json rename to testutil/testdata/ethereum/tx_29.json diff --git a/pkg/testdata/ethereum/tx_3.json b/testutil/testdata/ethereum/tx_3.json similarity index 100% rename from pkg/testdata/ethereum/tx_3.json rename to testutil/testdata/ethereum/tx_3.json diff --git a/pkg/testdata/ethereum/tx_30.json b/testutil/testdata/ethereum/tx_30.json similarity index 100% rename from pkg/testdata/ethereum/tx_30.json rename to testutil/testdata/ethereum/tx_30.json diff --git a/pkg/testdata/ethereum/tx_31.json b/testutil/testdata/ethereum/tx_31.json similarity index 100% rename from pkg/testdata/ethereum/tx_31.json rename to testutil/testdata/ethereum/tx_31.json diff --git a/pkg/testdata/ethereum/tx_32.json b/testutil/testdata/ethereum/tx_32.json similarity index 100% rename from pkg/testdata/ethereum/tx_32.json rename to testutil/testdata/ethereum/tx_32.json diff --git a/pkg/testdata/ethereum/tx_33.json b/testutil/testdata/ethereum/tx_33.json similarity index 100% rename from pkg/testdata/ethereum/tx_33.json rename to testutil/testdata/ethereum/tx_33.json diff --git a/pkg/testdata/ethereum/tx_34.json b/testutil/testdata/ethereum/tx_34.json similarity index 100% rename from pkg/testdata/ethereum/tx_34.json rename to testutil/testdata/ethereum/tx_34.json diff --git a/pkg/testdata/ethereum/tx_35.json b/testutil/testdata/ethereum/tx_35.json similarity index 100% rename from pkg/testdata/ethereum/tx_35.json rename to testutil/testdata/ethereum/tx_35.json diff --git a/pkg/testdata/ethereum/tx_36.json b/testutil/testdata/ethereum/tx_36.json similarity index 100% rename from pkg/testdata/ethereum/tx_36.json rename to testutil/testdata/ethereum/tx_36.json diff --git a/pkg/testdata/ethereum/tx_37.json b/testutil/testdata/ethereum/tx_37.json similarity index 100% rename from pkg/testdata/ethereum/tx_37.json rename to testutil/testdata/ethereum/tx_37.json diff --git a/pkg/testdata/ethereum/tx_38.json b/testutil/testdata/ethereum/tx_38.json similarity index 100% rename from pkg/testdata/ethereum/tx_38.json rename to testutil/testdata/ethereum/tx_38.json diff --git a/pkg/testdata/ethereum/tx_39.json b/testutil/testdata/ethereum/tx_39.json similarity index 100% rename from pkg/testdata/ethereum/tx_39.json rename to testutil/testdata/ethereum/tx_39.json diff --git a/pkg/testdata/ethereum/tx_4.json b/testutil/testdata/ethereum/tx_4.json similarity index 100% rename from pkg/testdata/ethereum/tx_4.json rename to testutil/testdata/ethereum/tx_4.json diff --git a/pkg/testdata/ethereum/tx_40.json b/testutil/testdata/ethereum/tx_40.json similarity index 100% rename from pkg/testdata/ethereum/tx_40.json rename to testutil/testdata/ethereum/tx_40.json diff --git a/pkg/testdata/ethereum/tx_41.json b/testutil/testdata/ethereum/tx_41.json similarity index 100% rename from pkg/testdata/ethereum/tx_41.json rename to testutil/testdata/ethereum/tx_41.json diff --git a/pkg/testdata/ethereum/tx_42.json b/testutil/testdata/ethereum/tx_42.json similarity index 100% rename from pkg/testdata/ethereum/tx_42.json rename to testutil/testdata/ethereum/tx_42.json diff --git a/pkg/testdata/ethereum/tx_43.json b/testutil/testdata/ethereum/tx_43.json similarity index 100% rename from pkg/testdata/ethereum/tx_43.json rename to testutil/testdata/ethereum/tx_43.json diff --git a/pkg/testdata/ethereum/tx_44.json b/testutil/testdata/ethereum/tx_44.json similarity index 100% rename from pkg/testdata/ethereum/tx_44.json rename to testutil/testdata/ethereum/tx_44.json diff --git a/pkg/testdata/ethereum/tx_45.json b/testutil/testdata/ethereum/tx_45.json similarity index 100% rename from pkg/testdata/ethereum/tx_45.json rename to testutil/testdata/ethereum/tx_45.json diff --git a/pkg/testdata/ethereum/tx_46.json b/testutil/testdata/ethereum/tx_46.json similarity index 100% rename from pkg/testdata/ethereum/tx_46.json rename to testutil/testdata/ethereum/tx_46.json diff --git a/pkg/testdata/ethereum/tx_47.json b/testutil/testdata/ethereum/tx_47.json similarity index 100% rename from pkg/testdata/ethereum/tx_47.json rename to testutil/testdata/ethereum/tx_47.json diff --git a/pkg/testdata/ethereum/tx_48.json b/testutil/testdata/ethereum/tx_48.json similarity index 100% rename from pkg/testdata/ethereum/tx_48.json rename to testutil/testdata/ethereum/tx_48.json diff --git a/pkg/testdata/ethereum/tx_49.json b/testutil/testdata/ethereum/tx_49.json similarity index 100% rename from pkg/testdata/ethereum/tx_49.json rename to testutil/testdata/ethereum/tx_49.json diff --git a/pkg/testdata/ethereum/tx_5.json b/testutil/testdata/ethereum/tx_5.json similarity index 100% rename from pkg/testdata/ethereum/tx_5.json rename to testutil/testdata/ethereum/tx_5.json diff --git a/pkg/testdata/ethereum/tx_50.json b/testutil/testdata/ethereum/tx_50.json similarity index 100% rename from pkg/testdata/ethereum/tx_50.json rename to testutil/testdata/ethereum/tx_50.json diff --git a/pkg/testdata/ethereum/tx_51.json b/testutil/testdata/ethereum/tx_51.json similarity index 100% rename from pkg/testdata/ethereum/tx_51.json rename to testutil/testdata/ethereum/tx_51.json diff --git a/pkg/testdata/ethereum/tx_52.json b/testutil/testdata/ethereum/tx_52.json similarity index 100% rename from pkg/testdata/ethereum/tx_52.json rename to testutil/testdata/ethereum/tx_52.json diff --git a/pkg/testdata/ethereum/tx_53.json b/testutil/testdata/ethereum/tx_53.json similarity index 100% rename from pkg/testdata/ethereum/tx_53.json rename to testutil/testdata/ethereum/tx_53.json diff --git a/pkg/testdata/ethereum/tx_54.json b/testutil/testdata/ethereum/tx_54.json similarity index 100% rename from pkg/testdata/ethereum/tx_54.json rename to testutil/testdata/ethereum/tx_54.json diff --git a/pkg/testdata/ethereum/tx_55.json b/testutil/testdata/ethereum/tx_55.json similarity index 100% rename from pkg/testdata/ethereum/tx_55.json rename to testutil/testdata/ethereum/tx_55.json diff --git a/pkg/testdata/ethereum/tx_56.json b/testutil/testdata/ethereum/tx_56.json similarity index 100% rename from pkg/testdata/ethereum/tx_56.json rename to testutil/testdata/ethereum/tx_56.json diff --git a/pkg/testdata/ethereum/tx_57.json b/testutil/testdata/ethereum/tx_57.json similarity index 100% rename from pkg/testdata/ethereum/tx_57.json rename to testutil/testdata/ethereum/tx_57.json diff --git a/pkg/testdata/ethereum/tx_58.json b/testutil/testdata/ethereum/tx_58.json similarity index 100% rename from pkg/testdata/ethereum/tx_58.json rename to testutil/testdata/ethereum/tx_58.json diff --git a/pkg/testdata/ethereum/tx_59.json b/testutil/testdata/ethereum/tx_59.json similarity index 100% rename from pkg/testdata/ethereum/tx_59.json rename to testutil/testdata/ethereum/tx_59.json diff --git a/pkg/testdata/ethereum/tx_6.json b/testutil/testdata/ethereum/tx_6.json similarity index 100% rename from pkg/testdata/ethereum/tx_6.json rename to testutil/testdata/ethereum/tx_6.json diff --git a/pkg/testdata/ethereum/tx_60.json b/testutil/testdata/ethereum/tx_60.json similarity index 100% rename from pkg/testdata/ethereum/tx_60.json rename to testutil/testdata/ethereum/tx_60.json diff --git a/pkg/testdata/ethereum/tx_61.json b/testutil/testdata/ethereum/tx_61.json similarity index 100% rename from pkg/testdata/ethereum/tx_61.json rename to testutil/testdata/ethereum/tx_61.json diff --git a/pkg/testdata/ethereum/tx_62.json b/testutil/testdata/ethereum/tx_62.json similarity index 100% rename from pkg/testdata/ethereum/tx_62.json rename to testutil/testdata/ethereum/tx_62.json diff --git a/pkg/testdata/ethereum/tx_63.json b/testutil/testdata/ethereum/tx_63.json similarity index 100% rename from pkg/testdata/ethereum/tx_63.json rename to testutil/testdata/ethereum/tx_63.json diff --git a/pkg/testdata/ethereum/tx_64.json b/testutil/testdata/ethereum/tx_64.json similarity index 100% rename from pkg/testdata/ethereum/tx_64.json rename to testutil/testdata/ethereum/tx_64.json diff --git a/pkg/testdata/ethereum/tx_65.json b/testutil/testdata/ethereum/tx_65.json similarity index 100% rename from pkg/testdata/ethereum/tx_65.json rename to testutil/testdata/ethereum/tx_65.json diff --git a/pkg/testdata/ethereum/tx_66.json b/testutil/testdata/ethereum/tx_66.json similarity index 100% rename from pkg/testdata/ethereum/tx_66.json rename to testutil/testdata/ethereum/tx_66.json diff --git a/pkg/testdata/ethereum/tx_67.json b/testutil/testdata/ethereum/tx_67.json similarity index 100% rename from pkg/testdata/ethereum/tx_67.json rename to testutil/testdata/ethereum/tx_67.json diff --git a/pkg/testdata/ethereum/tx_68.json b/testutil/testdata/ethereum/tx_68.json similarity index 100% rename from pkg/testdata/ethereum/tx_68.json rename to testutil/testdata/ethereum/tx_68.json diff --git a/pkg/testdata/ethereum/tx_69.json b/testutil/testdata/ethereum/tx_69.json similarity index 100% rename from pkg/testdata/ethereum/tx_69.json rename to testutil/testdata/ethereum/tx_69.json diff --git a/pkg/testdata/ethereum/tx_7.json b/testutil/testdata/ethereum/tx_7.json similarity index 100% rename from pkg/testdata/ethereum/tx_7.json rename to testutil/testdata/ethereum/tx_7.json diff --git a/pkg/testdata/ethereum/tx_70.json b/testutil/testdata/ethereum/tx_70.json similarity index 100% rename from pkg/testdata/ethereum/tx_70.json rename to testutil/testdata/ethereum/tx_70.json diff --git a/pkg/testdata/ethereum/tx_71.json b/testutil/testdata/ethereum/tx_71.json similarity index 100% rename from pkg/testdata/ethereum/tx_71.json rename to testutil/testdata/ethereum/tx_71.json diff --git a/pkg/testdata/ethereum/tx_72.json b/testutil/testdata/ethereum/tx_72.json similarity index 100% rename from pkg/testdata/ethereum/tx_72.json rename to testutil/testdata/ethereum/tx_72.json diff --git a/pkg/testdata/ethereum/tx_73.json b/testutil/testdata/ethereum/tx_73.json similarity index 100% rename from pkg/testdata/ethereum/tx_73.json rename to testutil/testdata/ethereum/tx_73.json diff --git a/pkg/testdata/ethereum/tx_74.json b/testutil/testdata/ethereum/tx_74.json similarity index 100% rename from pkg/testdata/ethereum/tx_74.json rename to testutil/testdata/ethereum/tx_74.json diff --git a/pkg/testdata/ethereum/tx_75.json b/testutil/testdata/ethereum/tx_75.json similarity index 100% rename from pkg/testdata/ethereum/tx_75.json rename to testutil/testdata/ethereum/tx_75.json diff --git a/pkg/testdata/ethereum/tx_76.json b/testutil/testdata/ethereum/tx_76.json similarity index 100% rename from pkg/testdata/ethereum/tx_76.json rename to testutil/testdata/ethereum/tx_76.json diff --git a/pkg/testdata/ethereum/tx_77.json b/testutil/testdata/ethereum/tx_77.json similarity index 100% rename from pkg/testdata/ethereum/tx_77.json rename to testutil/testdata/ethereum/tx_77.json diff --git a/pkg/testdata/ethereum/tx_78.json b/testutil/testdata/ethereum/tx_78.json similarity index 100% rename from pkg/testdata/ethereum/tx_78.json rename to testutil/testdata/ethereum/tx_78.json diff --git a/pkg/testdata/ethereum/tx_79.json b/testutil/testdata/ethereum/tx_79.json similarity index 100% rename from pkg/testdata/ethereum/tx_79.json rename to testutil/testdata/ethereum/tx_79.json diff --git a/pkg/testdata/ethereum/tx_8.json b/testutil/testdata/ethereum/tx_8.json similarity index 100% rename from pkg/testdata/ethereum/tx_8.json rename to testutil/testdata/ethereum/tx_8.json diff --git a/pkg/testdata/ethereum/tx_80.json b/testutil/testdata/ethereum/tx_80.json similarity index 100% rename from pkg/testdata/ethereum/tx_80.json rename to testutil/testdata/ethereum/tx_80.json diff --git a/pkg/testdata/ethereum/tx_9.json b/testutil/testdata/ethereum/tx_9.json similarity index 100% rename from pkg/testdata/ethereum/tx_9.json rename to testutil/testdata/ethereum/tx_9.json diff --git a/pkg/testdata/test_blocks.json b/testutil/testdata/test_blocks.json similarity index 100% rename from pkg/testdata/test_blocks.json rename to testutil/testdata/test_blocks.json diff --git a/pkg/testdata/testdata.go b/testutil/testdata/testdata.go similarity index 100% rename from pkg/testdata/testdata.go rename to testutil/testdata/testdata.go diff --git a/pkg/testdata/types/chain_info.json b/testutil/testdata/types/chain_info.json similarity index 100% rename from pkg/testdata/types/chain_info.json rename to testutil/testdata/types/chain_info.json diff --git a/pkg/testdata/types/policies.json b/testutil/testdata/types/policies.json similarity index 100% rename from pkg/testdata/types/policies.json rename to testutil/testdata/types/policies.json diff --git a/x/authority/client/cli/tx_update_chain_info_test.go b/x/authority/client/cli/tx_update_chain_info_test.go index 95b033777f..2d04a82b29 100644 --- a/x/authority/client/cli/tx_update_chain_info_test.go +++ b/x/authority/client/cli/tx_update_chain_info_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg/chains" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" "github.com/zeta-chain/zetacore/x/authority/client/cli" ) diff --git a/x/authority/client/cli/tx_update_policies_test.go b/x/authority/client/cli/tx_update_policies_test.go index 45e6813fcb..35756605c9 100644 --- a/x/authority/client/cli/tx_update_policies_test.go +++ b/x/authority/client/cli/tx_update_policies_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg/testdata" + "github.com/zeta-chain/zetacore/testutil/testdata" "github.com/zeta-chain/zetacore/x/authority/client/cli" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" ) diff --git a/x/observer/types/message_vote_block_header_test.go b/x/observer/types/message_vote_block_header_test.go index 192d164d43..763114c122 100644 --- a/x/observer/types/message_vote_block_header_test.go +++ b/x/observer/types/message_vote_block_header_test.go @@ -20,7 +20,7 @@ import ( func TestMsgVoteBlockHeader_ValidateBasic(t *testing.T) { keeper.SetConfig(false) var header ethtypes.Header - file, err := os.Open("../../../pkg/testdata/eth_header_18495266.json") + file, err := os.Open("../../../testutil/testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) diff --git a/zetaclient/zetacore/tx_test.go b/zetaclient/zetacore/tx_test.go index 919f9cc058..bd860bc894 100644 --- a/zetaclient/zetacore/tx_test.go +++ b/zetaclient/zetacore/tx_test.go @@ -123,7 +123,7 @@ func MockBroadcastError(_ *Client, _ uint64, _ sdktypes.Msg, _ authz.Signer) (st func getHeaderData(t *testing.T) proofs.HeaderData { var header ethtypes.Header - file, err := os.Open("../../pkg/testdata/eth_header_18495266.json") + file, err := os.Open("../../testutil/testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096)