From b57f206f107b61a8bde5aa04e38b35928c2c6b62 Mon Sep 17 00:00:00 2001 From: YashK Date: Wed, 11 Sep 2024 16:10:21 +0530 Subject: [PATCH] refactor: fixed additional tests in cmd package --- cmd/initiateWithdraw_test.go | 2 +- cmd/stakerInfo_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/initiateWithdraw_test.go b/cmd/initiateWithdraw_test.go index b56923d2..975aa810 100644 --- a/cmd/initiateWithdraw_test.go +++ b/cmd/initiateWithdraw_test.go @@ -182,7 +182,7 @@ func TestHandleUnstakeLock(t *testing.T) { cmdUtilsMock.On("WaitForAppropriateState", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.state, tt.args.stateErr) utilsMock.On("GetLock", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.lock, tt.args.lockErr) - utilsMock.On("GetWithdrawInitiationPeriod", mock.Anything).Return(tt.args.withdrawReleasePeriod, tt.args.withdrawReleasePeriodErr) + utilsMock.On("GetWithdrawInitiationPeriod", mock.Anything, mock.Anything).Return(tt.args.withdrawReleasePeriod, tt.args.withdrawReleasePeriodErr) utilsMock.On("GetEpoch", mock.Anything, mock.Anything).Return(tt.args.epoch, tt.args.epochErr) utilsMock.On("GetTxnOpts", mock.Anything, mock.Anything).Return(TxnOpts) cmdUtilsMock.On("InitiateWithdraw", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.withdrawHash, tt.args.withdrawErr) diff --git a/cmd/stakerInfo_test.go b/cmd/stakerInfo_test.go index 66942a75..db5a69e1 100644 --- a/cmd/stakerInfo_test.go +++ b/cmd/stakerInfo_test.go @@ -317,7 +317,7 @@ func TestUtilsStruct_ExecuteStakerinfo(t *testing.T) { cmdUtilsMock.On("GetConfigData").Return(tt.args.config, tt.args.configErr) utilsMock.On("ConnectToClient", mock.AnythingOfType("string")).Return(client) flagSetUtilsMock.On("GetUint32StakerId", flagSet).Return(tt.args.stakerId, tt.args.stakerIdErr) - cmdUtilsMock.On("GetStakerInfo", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("uint32")).Return(tt.args.stakerInfoErr) + cmdUtilsMock.On("GetStakerInfo", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.stakerInfoErr) utils := &UtilsStruct{} fatal = false