added TestGetAssociatedVoteAccounts
This commit is contained in:
parent
0523a4d506
commit
2bd9eb89d7
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/asymmetric-research/solana_exporter/pkg/rpc"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
@ -45,3 +46,13 @@ func TestFetchBalances(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.Equal(t, balances, fetchedBalances)
|
||||
}
|
||||
|
||||
func TestGetAssociatedVoteAccounts(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
client := staticRPCClient{}
|
||||
voteAccounts, err := GetAssociatedVoteAccounts(ctx, &client, rpc.CommitmentFinalized, identities)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, votekeys, voteAccounts)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue