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

cmd: add full unit test for test peers command #3082

Merged
merged 2 commits into from
May 15, 2024

Conversation

KaloyanTanev
Copy link
Contributor

@KaloyanTanev KaloyanTanev commented May 10, 2024

Add proper unit test for peers - spinning up multiple peers and local relay and running the peer tests between them.

Some other minor improvements:

  • use enrs of the deterministic private keys created in the beginning;
  • remove logger init in testpeers.go;
  • add prepare func;
  • rename cfg to conf to be consistent with the rest of the codebase.

testpeers.go coverage has been increased to 86.4%.

category: test
ticket: #3064

@KaloyanTanev KaloyanTanev self-assigned this May 10, 2024
@KaloyanTanev KaloyanTanev marked this pull request as draft May 10, 2024 11:19
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.84%. Comparing base (9c65c8d) to head (4d7e031).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3082      +/-   ##
==========================================
+ Coverage   56.44%   56.84%   +0.40%     
==========================================
  Files         208      208              
  Lines       29026    29022       -4     
==========================================
+ Hits        16384    16498     +114     
+ Misses      10823    10695     -128     
- Partials     1819     1829      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KaloyanTanev
Copy link
Contributor Author

Waiting on #3073 to be merged first.

@KaloyanTanev KaloyanTanev marked this pull request as ready for review May 10, 2024 13:47
@KaloyanTanev KaloyanTanev force-pushed the kalo/peers-test-improve-unit-tests branch from 746c3b6 to 4d7e031 Compare May 14, 2024 11:17
Copy link

sonarcloud bot commented May 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@KaloyanTanev KaloyanTanev added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 15, 2024
@obol-bulldozer obol-bulldozer bot merged commit 356f67a into main May 15, 2024
14 checks passed
@obol-bulldozer obol-bulldozer bot deleted the kalo/peers-test-improve-unit-tests branch May 15, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants