Skip to content

Commit

Permalink
revert interface rename
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Feb 12, 2024
1 parent 20d3909 commit 9d6f4c7
Show file tree
Hide file tree
Showing 32 changed files with 495 additions and 495 deletions.
40 changes: 20 additions & 20 deletions cmd/validator/accounts/exit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
func TestExitAccountsCli_OK(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
coord := validatormock.NewMockCoordinator(ctrl)
mockValidatorClient := validatormock.NewMockValidatorClient(ctrl)
mockNodeClient := validatormock.NewMockNodeClient(ctrl)

coord.EXPECT().
mockValidatorClient.EXPECT().
ValidatorIndex(gomock.Any(), gomock.Any()).
Return(&ethpb.ValidatorIndexResponse{Index: 1}, nil)

Expand All @@ -40,11 +40,11 @@ func TestExitAccountsCli_OK(t *testing.T) {
GetGenesis(gomock.Any(), gomock.Any()).
Return(&ethpb.Genesis{GenesisTime: genesisTime}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
DomainData(gomock.Any(), gomock.Any()).
Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
ProposeExit(gomock.Any(), gomock.AssignableToTypeOf(&ethpb.SignedVoluntaryExit{})).
Return(&ethpb.ProposeExitResponse{}, nil)

Expand Down Expand Up @@ -99,7 +99,7 @@ func TestExitAccountsCli_OK(t *testing.T) {
require.NotNil(t, formattedPubKeys)

cfg := accounts.PerformExitCfg{
Coordinator: coord,
ValidatorClient: mockValidatorClient,
NodeClient: mockNodeClient,
Keymanager: km,
RawPubKeys: rawPubKeys,
Expand All @@ -116,14 +116,14 @@ func TestExitAccountsCli_OK(t *testing.T) {
func TestExitAccountsCli_OK_AllPublicKeys(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
coord := validatormock.NewMockCoordinator(ctrl)
mockValidatorClient := validatormock.NewMockValidatorClient(ctrl)
mockNodeClient := validatormock.NewMockNodeClient(ctrl)

coord.EXPECT().
mockValidatorClient.EXPECT().
ValidatorIndex(gomock.Any(), gomock.Any()).
Return(&ethpb.ValidatorIndexResponse{Index: 0}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
ValidatorIndex(gomock.Any(), gomock.Any()).
Return(&ethpb.ValidatorIndexResponse{Index: 1}, nil)

Expand All @@ -136,12 +136,12 @@ func TestExitAccountsCli_OK_AllPublicKeys(t *testing.T) {
GetGenesis(gomock.Any(), gomock.Any()).
Return(&ethpb.Genesis{GenesisTime: genesisTime}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
DomainData(gomock.Any(), gomock.Any()).
Times(2).
Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
ProposeExit(gomock.Any(), gomock.AssignableToTypeOf(&ethpb.SignedVoluntaryExit{})).
Times(2).
Return(&ethpb.ProposeExitResponse{}, nil)
Expand Down Expand Up @@ -199,7 +199,7 @@ func TestExitAccountsCli_OK_AllPublicKeys(t *testing.T) {
require.NotNil(t, formattedPubKeys)

cfg := accounts.PerformExitCfg{
Coordinator: coord,
ValidatorClient: mockValidatorClient,
NodeClient: mockNodeClient,
Keymanager: km,
RawPubKeys: rawPubKeys,
Expand All @@ -222,10 +222,10 @@ func TestExitAccountsCli_OK_AllPublicKeys(t *testing.T) {
func TestExitAccountsCli_OK_ForceExit(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
coord := validatormock.NewMockCoordinator(ctrl)
mockValidatorClient := validatormock.NewMockValidatorClient(ctrl)
mockNodeClient := validatormock.NewMockNodeClient(ctrl)

coord.EXPECT().
mockValidatorClient.EXPECT().
ValidatorIndex(gomock.Any(), gomock.Any()).
Return(&ethpb.ValidatorIndexResponse{Index: 1}, nil)

Expand All @@ -238,11 +238,11 @@ func TestExitAccountsCli_OK_ForceExit(t *testing.T) {
GetGenesis(gomock.Any(), gomock.Any()).
Return(&ethpb.Genesis{GenesisTime: genesisTime}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
DomainData(gomock.Any(), gomock.Any()).
Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
ProposeExit(gomock.Any(), gomock.AssignableToTypeOf(&ethpb.SignedVoluntaryExit{})).
Return(&ethpb.ProposeExitResponse{}, nil)

Expand Down Expand Up @@ -294,7 +294,7 @@ func TestExitAccountsCli_OK_ForceExit(t *testing.T) {
require.NotNil(t, formattedPubKeys)

cfg := accounts.PerformExitCfg{
Coordinator: coord,
ValidatorClient: mockValidatorClient,
NodeClient: mockNodeClient,
Keymanager: km,
RawPubKeys: rawPubKeys,
Expand All @@ -311,10 +311,10 @@ func TestExitAccountsCli_OK_ForceExit(t *testing.T) {
func TestExitAccountsCli_WriteJSON_NoBroadcast(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
coord := validatormock.NewMockCoordinator(ctrl)
mockValidatorClient := validatormock.NewMockValidatorClient(ctrl)
mockNodeClient := validatormock.NewMockNodeClient(ctrl)

coord.EXPECT().
mockValidatorClient.EXPECT().
ValidatorIndex(gomock.Any(), gomock.Any()).
Return(&ethpb.ValidatorIndexResponse{Index: 1}, nil)

Expand All @@ -327,7 +327,7 @@ func TestExitAccountsCli_WriteJSON_NoBroadcast(t *testing.T) {
GetGenesis(gomock.Any(), gomock.Any()).
Return(&ethpb.Genesis{GenesisTime: genesisTime}, nil)

coord.EXPECT().
mockValidatorClient.EXPECT().
DomainData(gomock.Any(), gomock.Any()).
Return(&ethpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)

Expand Down Expand Up @@ -381,7 +381,7 @@ func TestExitAccountsCli_WriteJSON_NoBroadcast(t *testing.T) {
out := path.Join(bazel.TestTmpDir(), "exits")

cfg := accounts.PerformExitCfg{
Coordinator: coord,
ValidatorClient: mockValidatorClient,
NodeClient: mockNodeClient,
Keymanager: km,
RawPubKeys: rawPubKeys,
Expand Down
Loading

0 comments on commit 9d6f4c7

Please sign in to comment.