Skip to content

Commit

Permalink
chore: restore failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 23, 2024
1 parent e9858fe commit e35a662
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions internal/storage/ledger/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,29 +327,23 @@ func TestGetAccount(t *testing.T) {
}, *account)
})

// todo: sometimes failing, need to debug
//t.Run("find account using pit", func(t *testing.T) {
// t.Parallel()
//
// account, err := store.GetAccount(ctx, ledgercontroller.NewGetAccountQuery("multi").WithPIT(now))
// require.NoError(t, err)
// require.Equal(t, ledger.Account{
// Account: ledger.Account{
// Address: "multi",
// Metadata: metadata.Metadata{},
// FirstUsage: now.Add(-time.Minute),
// },
// AggregatedAccountVolumes: map[string]ledger.AggregatedAccountVolumes{},
// EffectiveVolumes: map[string]ledger.AggregatedAccountVolumes{},
// }, *account)
//})
t.Run("find account using pit", func(t *testing.T) {
t.Parallel()

account, err := store.GetAccount(ctx, ledgercontroller.NewGetAccountQuery("multi").WithPIT(now))
require.NoError(t, err)
require.Equal(t, ledger.Account{
Address: "multi",
Metadata: metadata.Metadata{},
FirstUsage: now.Add(-time.Minute),
}, *account)
})

t.Run("not existent account", func(t *testing.T) {
t.Parallel()
_, err := store.GetAccount(ctx, ledgercontroller.NewGetAccountQuery("account_not_existing"))
require.Error(t, err)
})

}

func TestGetAccountWithVolumes(t *testing.T) {
Expand Down

0 comments on commit e35a662

Please sign in to comment.