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

test(swamp/share): cover share module with swamp tests #4036

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

vgonkivs
Copy link
Member

self-explanatory

@vgonkivs vgonkivs added area:shares Shares and samples kind:testing Related to unit tests swamp Related to Integration tests labels Jan 10, 2025
@vgonkivs vgonkivs self-assigned this Jan 10, 2025
@vgonkivs vgonkivs force-pushed the cover_share_with_swamp_tests branch from 06f683d to 6cd9e3b Compare January 10, 2025 14:03
@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 45.32%. Comparing base (2469e7a) to head (93dba58).
Report is 416 commits behind head on main.

Files with missing lines Patch % Lines
share/shwap/sample.go 0.00% 15 Missing ⚠️
blob/helper.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4036      +/-   ##
==========================================
+ Coverage   44.83%   45.32%   +0.48%     
==========================================
  Files         265      309      +44     
  Lines       14620    22304    +7684     
==========================================
+ Hits         6555    10109    +3554     
- Misses       7313    11120    +3807     
- Partials      752     1075     +323     

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

renaynay
renaynay previously approved these changes Jan 15, 2025
nodebuilder/tests/share_test.go Outdated Show resolved Hide resolved
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

Okay with me, thank you

"github.com/celestiaorg/celestia-node/state"
)

func TestShareModule(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

This test is structured a lot like a unit test, which is helpful but not exactly what integration tests(Swamp) are for. Like intergration tests should not test "invalid height" that's a unit test concern. On the other side, this test would benefit from testing GetRow on Q1/Q2 and Q3/Q4 and accessing it from every node type, rather than light only. In simple terms, you want to test things that involve multiple components here(the full node), not the single ifs in one component.

So as actionable I would make sure the tests are working for every node type and move out unit tests out. If moving out units is complicated, I am fine with parking it in the issue.

Copy link
Member Author

@vgonkivs vgonkivs Jan 16, 2025

Choose a reason for hiding this comment

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

Thanks for the structured feedback. Make a lot of sense. Removing unit tests is not a big deal, so I'm fine w removing them within this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples kind:testing Related to unit tests swamp Related to Integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants