diff --git a/cmd/solana_exporter/utils_test.go b/cmd/solana_exporter/utils_test.go index 6b4fb33..8054091 100644 --- a/cmd/solana_exporter/utils_test.go +++ b/cmd/solana_exporter/utils_test.go @@ -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) +}