Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move testdata from pkg to testutil #2296

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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

Expand Down
2 changes: 1 addition & 1 deletion pkg/proofs/bitcoin/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/proofs/ethereum/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/proofs/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/proofs/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion testutil/sample/lightclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion x/authority/client/cli/tx_update_chain_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion x/authority/client/cli/tx_update_policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion x/observer/types/message_vote_block_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion zetaclient/zetacore/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading