Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2etest] add more test #4322

Merged
merged 9 commits into from
Jul 4, 2024
Merged

[e2etest] add more test #4322

merged 9 commits into from
Jul 4, 2024

Conversation

envestcc
Copy link
Member

@envestcc envestcc commented Jul 2, 2024

Description

add more tests on claimreward, new staking contract indexer, transfer ownership and revise endorsement

Type of change

Please delete options that are not relevant.

  • Code refactor or improvement

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@envestcc envestcc requested review from CoderZhi, dustinxie, Liuhaai and a team as code owners July 2, 2024 13:10
@@ -470,3 +471,43 @@ func SignedMigrateStake(
}
return selp, nil
}

func SignedClaimRewardLegacy(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, functions in this file should be auxiliary functions in test files, since the tx builder and signing is clear already.

@@ -471,6 +472,78 @@ func TestBlockEpochReward(t *testing.T) {
}
}

func TestClaimReward(t *testing.T) {
t.Skip("")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why skip the test?
You can refer to changes in integrity_test.go, need to register a poll protocol (so that it will return a valid candidate, whose rewardAddr you can claim reward from it)

Copy link

sonarcloud bot commented Jul 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@envestcc envestcc merged commit 41258f5 into master Jul 4, 2024
2 of 3 checks passed
@envestcc envestcc deleted the e2etest branch July 4, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants