bosnet / sebak

SEBAK, the next BOScoin Blockchain
https://devteam.blockchainos.org
GNU General Public License v3.0
44 stars 15 forks source link

Replace NewEndpointFromString with ParseEndpoint, improve tests #921

Closed Geod24 closed 5 years ago

Geod24 commented 5 years ago
NewEndpointFromString was primarily used from tests and had a different semantic
than the more complere ParseEndpoint.
Since having two functions to convert a string to an Endpoint is a bad sign,
the lesser function (with the longest name) was removed.
In addition, since many (mosts?) tests seemed to ignore the error return value,
a test-only MustParseEndpoint was introduced, as ignoring a return value
is a deadly sin.
codecov-io commented 5 years ago

Codecov Report

Merging #921 into master will decrease coverage by 0.05%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #921      +/-   ##
==========================================
- Coverage    60.8%   60.75%   -0.06%     
==========================================
  Files         159      159              
  Lines       11262    11260       -2     
==========================================
- Hits         6848     6841       -7     
- Misses       3609     3615       +6     
+ Partials      805      804       -1
Flag Coverage Δ
#integration_tests_long_term 44.09% <0%> (-0.06%) :arrow_down:
#integration_tests_node 40.56% <0%> (-0.06%) :arrow_down:
#integration_tests_retry 37.72% <0%> (-0.11%) :arrow_down:
#unittests 47.4% <0%> (ø) :arrow_up:
Impacted Files Coverage Δ
lib/common/net.go 37% <ø> (-3.3%) :arrow_down:
cmd/sebak/cmd/run.go 56.92% <0%> (ø) :arrow_up:
lib/common/test.go 25% <0%> (-4.63%) :arrow_down:

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 073713c...7e33d29. Read the comment docs.