Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Jun 25, 2024
1 parent 182388a commit cfe1123
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions action/protocol/staking/vote_reviser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ func TestVoteReviser(t *testing.T) {
r.Nil(csm.GetByName(oldCand.Name))
}

// TODO: merge TestVoteRevise_CorrectEndorsement and TestVoteRevise_CorrectSelfStake
func TestVoteRevise_CorrectEndorsement(t *testing.T) {
r := require.New(t)
t.Run("correct endorse height", func(t *testing.T) {
Expand Down Expand Up @@ -282,10 +281,6 @@ func TestVoteRevise_CorrectEndorsement(t *testing.T) {
r.ErrorIs(err, state.ErrStateNotExist)
})
})
}

func TestVoteRevise_CorrectSelfStake(t *testing.T) {
r := require.New(t)
t.Run("correct selfstake height", func(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
SelfStakeBucketReviseHeights: []uint64{1, 3},
Expand Down Expand Up @@ -324,6 +319,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
VoteWeight: g.VoteWeightCalConsts,
SelfStakeBucketReviseHeights: []uint64{2},
ReviseHeights: []uint64{2},
})
bkt := &VoteBucket{
Index: 0,
Expand Down Expand Up @@ -359,6 +355,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
VoteWeight: g.VoteWeightCalConsts,
SelfStakeBucketReviseHeights: []uint64{2},
ReviseHeights: []uint64{2},
})
bkt := &VoteBucket{
Index: 1,
Expand Down Expand Up @@ -398,6 +395,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
VoteWeight: g.VoteWeightCalConsts,
SelfStakeBucketReviseHeights: []uint64{2},
ReviseHeights: []uint64{2},
})
bkt := &VoteBucket{
Candidate: identityset.Address(3),
Expand Down Expand Up @@ -434,6 +432,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
VoteWeight: g.VoteWeightCalConsts,
SelfStakeBucketReviseHeights: []uint64{2},
ReviseHeights: []uint64{2},
})
bkt := &VoteBucket{
Candidate: identityset.Address(4),
Expand Down Expand Up @@ -470,6 +469,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) {
revise := NewVoteReviser(ReviseConfig{
VoteWeight: g.VoteWeightCalConsts,
SelfStakeBucketReviseHeights: []uint64{2},
ReviseHeights: []uint64{2},
})
bkt := &VoteBucket{
Candidate: identityset.Address(5),
Expand Down

0 comments on commit cfe1123

Please sign in to comment.