Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy committed Nov 26, 2024
1 parent 92a279a commit c9dd185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package price_fetcher

import (
"testing"

"cosmossdk.io/log"
"github.com/dydxprotocol/v4-chain/protocol/daemons/pricefeed/client/types"
"github.com/dydxprotocol/v4-chain/protocol/mocks"
"github.com/dydxprotocol/v4-chain/protocol/testutil/constants"
"github.com/stretchr/testify/require"
"testing"
)

func TestGetNextNMarkets(t *testing.T) {
Expand Down Expand Up @@ -70,7 +71,7 @@ func TestGetMarketExponents(t *testing.T) {
marketExponents := pf.mutableState.GetMarketExponents()
// Check that the mutableState contains the correct set of marketExponents
// and that it returns a copy of the map and not the original.
require.NotSame(t, marketExponents, pf.mutableState.marketExponents)
require.NotSame(t, &marketExponents, &pf.mutableState.marketExponents)
require.Equal(t, pf.mutableState.marketExponents, marketExponents)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestGetMarketConfigCopies(t *testing.T) {
require.Error(t, err, tc.ExpectedError.Error())
} else {
// Validate that this method returns a copy and not the original.
require.NotSame(t, tc.Expected, actual)
require.NotSame(t, &tc.Expected, &actual)
require.Equal(t, tc.Expected, actual)
require.NoError(t, err)
}
Expand Down

0 comments on commit c9dd185

Please sign in to comment.