prysm-pulse/validator/accounts/v1/status_test.go
Raul Jordan 417bb45398
Begin Scaffold of Validator Accounts V2 (#6310)
* v2 refactor
* fix up imports
* builds
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge branch 'master' into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* imports keymanager v1
* Update validator/keymanager/v1/remote.go
* Update validator/client/polling/propose.go
* Update validator/keymanager/v1/wallet.go
* fmt
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* Merge refs/heads/master into accounts-revamp-p1
* fix conf
* fix build
* gaz
2020-06-27 15:48:36 +00:00

33 lines
910 B
Go

package accounts
import (
"context"
"testing"
"github.com/golang/mock/gomock"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/prysm/shared/mock"
)
func TestFetchAccountStatuses_OK(t *testing.T) {
ctx := context.Background()
ctrl := gomock.NewController(t)
defer ctrl.Finish()
pubkeys := make([][]byte, 10000)
indices := make([]uint64, 10000)
for i := 0; i < 10000; i++ {
pubkeys[i] = []byte{byte(i)}
indices[i] = uint64(i)
}
mockClient := mock.NewMockBeaconNodeValidatorClient(ctrl)
mockClient.EXPECT().MultipleValidatorStatus(
gomock.Any(),
&ethpb.MultipleValidatorStatusRequest{PublicKeys: pubkeys},
).Return(&ethpb.MultipleValidatorStatusResponse{PublicKeys: pubkeys, Indices: indices}, nil /*err*/)
_, err := FetchAccountStatuses(ctx, mockClient, pubkeys)
if err != nil {
t.Fatalf("FetchAccountStatuses failed with error: %v.", err)
}
}