Skip to content

Commit

Permalink
refactor: fixed additional tests in cmd package
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Sep 11, 2024
1 parent 3eb87b9 commit b57f206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/initiateWithdraw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/stakerInfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b57f206

Please sign in to comment.