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

review code of torrentfs #63

Closed
wants to merge 4 commits into from
Closed

review code of torrentfs #63

wants to merge 4 commits into from

Conversation

ShadowErii
Copy link

Is it necessary to add test for these simple funcs like this to increse the coverage?

@ShadowErii ShadowErii marked this pull request as draft July 15, 2020 07:44
@ShadowErii ShadowErii added the good first issue Good for newcomers label Jul 15, 2020
@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #63 into master will increase coverage by 0.23%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
+ Coverage   22.68%   22.92%   +0.23%     
==========================================
  Files          13       13              
  Lines        2081     2068      -13     
==========================================
+ Hits          472      474       +2     
+ Misses       1543     1528      -15     
  Partials       66       66              
Impacted Files Coverage Δ
chaindb.go 0.00% <0.00%> (ø)
compress/compress.go 64.28% <ø> (-4.95%) ⬇️
merkletree/content.go 73.33% <0.00%> (+73.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d36297...99ae82a. Read the comment docs.

@ShadowErii ShadowErii linked an issue Jul 15, 2020 that may be closed by this pull request
@ucwong
Copy link
Member

ucwong commented Jul 15, 2020

Yes the more the better

@ShadowErii ShadowErii linked an issue Jul 18, 2020 that may be closed by this pull request
@ShadowErii ShadowErii changed the title fix code test coverage of torrentfs review code of torrentfs Jul 18, 2020
)

func SnappyEncode(data []byte) ([]byte, error) {
Copy link
Member

Choose a reason for hiding this comment

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

why move these methods here?

Copy link
Author

Choose a reason for hiding this comment

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

it seems that was just used for test

Copy link
Member

Choose a reason for hiding this comment

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

it seems that was just used for test

Oh no , it is the same with zip, another compress method but not used now.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

You can just add some comment above them to fix the linter

Copy link
Author

Choose a reason for hiding this comment

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

ok, i thought it was just to test zip can figure out the same result

@@ -3,15 +3,14 @@ package compress
import (
"bytes"
"compress/gzip"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/golang/snappy"
clog "github.com/CortexFoundation/CortexTheseus/log"
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to use a cname?

Copy link
Author

@ShadowErii ShadowErii Jul 18, 2020

Choose a reason for hiding this comment

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

forget to change back

@ucwong ucwong requested a review from DhunterAO July 18, 2020 10:24
@ShadowErii ShadowErii closed this Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

golint fix Code test coverage fix
2 participants