From fae2e4603594747dc5ab742db8dca8a9360b2966 Mon Sep 17 00:00:00 2001 From: Karel Moravec Date: Mon, 16 Oct 2023 17:34:59 +0200 Subject: [PATCH] fix: test and comments --- core/types/liquidity_fee_stats_test.go | 10 ++++++---- datanode/networkhistory/service_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/types/liquidity_fee_stats_test.go b/core/types/liquidity_fee_stats_test.go index 50f0f41e434..e78914ee9fb 100644 --- a/core/types/liquidity_fee_stats_test.go +++ b/core/types/liquidity_fee_stats_test.go @@ -13,21 +13,23 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -package types +package types_test import ( "testing" + "github.com/stretchr/testify/require" + + "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" v1 "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/stretchr/testify/require" ) func TestLiquidityFeeStats(t *testing.T) { market := "market1" asset := "usdt" - stats := NewLiquidityFeeStats() + stats := types.NewLiquidityFeeStats() stats.RegisterTotalFeesAmountPerParty(map[string]*num.Uint{ "a": num.UintFromUint64(2), @@ -55,7 +57,7 @@ func TestLiquidityFeeStats(t *testing.T) { require.Equal(t, expectedAmountsPerParty, statsProto.FeesPaidPerParty) require.Equal(t, "19", statsProto.TotalFeesPaid) - stats = NewLiquidityFeeStats() + stats = types.NewLiquidityFeeStats() statsProto = stats.ToProto(market, asset) require.Equal(t, []*v1.PartyAmount{}, statsProto.FeesPaidPerParty) diff --git a/datanode/networkhistory/service_test.go b/datanode/networkhistory/service_test.go index 34d396a62b2..7087163f69c 100644 --- a/datanode/networkhistory/service_test.go +++ b/datanode/networkhistory/service_test.go @@ -378,12 +378,12 @@ func TestMain(t *testing.M) { log.Infof("%s", goldenSourceHistorySegment[4000].HistorySegmentID) log.Infof("%s", goldenSourceHistorySegment[5000].HistorySegmentID) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[1000].HistorySegmentID, "QmYrVbhxx5LLwa51an7uBGsSNYRfNxLq8TmtHECCZ1dfHq", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2000].HistorySegmentID, "QmRtr3QBKdxaMutNpxz3jr2bb4AjcngkKQmqYRfgCULF4U", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2500].HistorySegmentID, "QmQ6TqEYwWoTdTJwmmNexPRtDQiRJHW21CFuSKMwdjEaCS", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[3000].HistorySegmentID, "QmShyPtkonnSofDj7EfdP6YieuX5Z3hah2wifrp1qFgQDE", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[4000].HistorySegmentID, "QmYyKDXtJBLCcg8qQGGwbahWme4vbaMgabthEFov3dNHFx", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[5000].HistorySegmentID, "QmWDXhoT1HJf81YGbRAY46jD1de8oqxb4vZ8H9TDADVxwY", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[1000].HistorySegmentID, "QmQhDsQ2B3DW8atmg8yoPvvAENeFxAK7Kh38hqceVucXKS", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2000].HistorySegmentID, "QmVt8swjn9PiBUcTm9GgqNtDuYYS7Cn9zCJgsWhh1fmbW5", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2500].HistorySegmentID, "QmcRiZxgfi2puvBf45y9gj7NusMRNEQaJW7E15fotbY2qo", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[3000].HistorySegmentID, "QmXkUYKR4rn3YJVxyWhJRXejVdfNdoMwNvnMD3b3VSnXso", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[4000].HistorySegmentID, "QmPmUYmPbSPx2wqWhNdFS5yqceX2KbDwSbaZV2pV5wr8XP", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[5000].HistorySegmentID, "QmcVLUZayWrqBtP5B8KC2sjCBb7kpHXeqJYcAqRGUKXLLN", snapshots) }, postgresRuntimePath, sqlFs) if exitCode != 0 {