Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Jul 10, 2024
1 parent 48ba73d commit 2290f11
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions api/grpcserver/v2alpha1/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ package v2alpha1
import (
"context"
"errors"
multisig2 "github.com/spacemeshos/go-spacemesh/genvm/sdk/multisig"
"github.com/spacemeshos/go-spacemesh/genvm/sdk/vesting"
"github.com/spacemeshos/go-spacemesh/genvm/templates/multisig"
"github.com/spacemeshos/go-spacemesh/genvm/templates/vault"
vesting2 "github.com/spacemeshos/go-spacemesh/genvm/templates/vesting"
"math/rand"
"testing"
"time"
Expand All @@ -27,7 +22,12 @@ import (
vm "github.com/spacemeshos/go-spacemesh/genvm"
"github.com/spacemeshos/go-spacemesh/genvm/core"
"github.com/spacemeshos/go-spacemesh/genvm/sdk"
multisig2 "github.com/spacemeshos/go-spacemesh/genvm/sdk/multisig"
"github.com/spacemeshos/go-spacemesh/genvm/sdk/vesting"
"github.com/spacemeshos/go-spacemesh/genvm/sdk/wallet"
"github.com/spacemeshos/go-spacemesh/genvm/templates/multisig"
"github.com/spacemeshos/go-spacemesh/genvm/templates/vault"
vesting2 "github.com/spacemeshos/go-spacemesh/genvm/templates/vesting"
pubsubmocks "github.com/spacemeshos/go-spacemesh/p2p/pubsub/mocks"
"github.com/spacemeshos/go-spacemesh/signing"
"github.com/spacemeshos/go-spacemesh/sql"
Expand Down Expand Up @@ -622,6 +622,11 @@ func TestToTxContents(t *testing.T) {
require.Nil(t, contents.GetVestingSpawn())
require.Nil(t, contents.GetSend())
require.Nil(t, contents.GetDrainVault())
require.Equal(t, vaultArgs.Owner.String(), contents.GetVaultSpawn().Owner)
require.Equal(t, vaultArgs.InitialUnlockAmount, contents.GetVaultSpawn().InitialUnlockAmount)
require.Equal(t, vaultArgs.TotalAmount, contents.GetVaultSpawn().TotalAmount)
require.Equal(t, vaultArgs.VestingStart.Uint32(), contents.GetVaultSpawn().VestingStart)
require.Equal(t, vaultArgs.VestingEnd.Uint32(), contents.GetVaultSpawn().VestingEnd)
require.Equal(t, spacemeshv2alpha1.Transaction_TRANSACTION_TYPE_VAULT_SPAWN, txType)
})

Expand Down Expand Up @@ -663,6 +668,7 @@ func TestToTxContents(t *testing.T) {
require.Nil(t, contents.GetVestingSpawn())
require.Nil(t, contents.GetSend())
require.Nil(t, contents.GetVaultSpawn())
require.Equal(t, vaultAddr.String(), contents.GetDrainVault().Vault)
require.Equal(t, spacemeshv2alpha1.Transaction_TRANSACTION_TYPE_DRAIN_VAULT, txType)
})

Expand Down

0 comments on commit 2290f11

Please sign in to comment.