Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Mar 18, 2024
1 parent 0e2189f commit 26b22c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* [1805](https://github.com/zeta-chain/node/pull/1805) - add admin and performance test and fix upgrade test
* [1879](https://github.com/zeta-chain/node/pull/1879) - full coverage for messages in types packages
* [1899](https://github.com/zeta-chain/node/pull/1899) - add empty test files so packages are included in coverage
* [1903](https://github.com/zeta-chain/node/pull/1903) - common package tests

### Fixes

Expand Down
2 changes: 1 addition & 1 deletion common/bitcoin/bitcoin_spv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func TestProve(t *testing.T) {
t.Run("returns true", func(t *testing.T) {
t.Run("returns true if empty block", func(t *testing.T) {
result := Prove(chainhash.Hash{}, chainhash.Hash{}, []byte{}, 0)
require.True(t, result)
})
Expand Down
2 changes: 2 additions & 0 deletions common/bitcoin/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func TestBitcoinMerkleProof(t *testing.T) {
})
}

// TODO: centralize test data
// https://github.com/zeta-chain/node/issues/1874
func LoadTestBlocks(t *testing.T) Blocks {
file, err := os.Open("../testdata/test_blocks.json")
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions common/gas_limits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
func TestMultiplyGasPrice(t *testing.T) {
testCases := []struct {
name string
medianGasPrice string // Using string to facilitate easy creation of sdkmath.Uint
medianGasPrice string
multiplierString string
expectedGasPrice string // Expected result also as string for easy comparison
expectedGasPrice string
wantErr bool
}{
{
Expand Down
2 changes: 2 additions & 0 deletions common/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type Blocks struct {
Blocks []Block `json:"blocks"`
}

// TODO: centralize test data
// https://github.com/zeta-chain/node/issues/1874
func LoadTestBlocks(t *testing.T) Blocks {
file, err := os.Open("./testdata/test_blocks.json")
require.NoError(t, err)
Expand Down

0 comments on commit 26b22c8

Please sign in to comment.