You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main_test contains a TestMain that evaluates the code coverage percentage when coverfail argument is passed. There are a few issues with this:
There are no tests in main_test package so when coverfail is passed, the threshold will never be met and therefore the test process will always fail
There is nothing in the repo that ever triggers go test with coverfail (possibly this is only for internal use?)
It is unclear what the intent of TestMain is here - is the goal to evaluate code coverage for the entire set of tests across entire codebase or just an individual package? As it stands, TestMain will only evaluate code coverage for the main package - using the approach taken to evaluate each individual package would require a TestMain in every package where code coverage should be evaluated. Alternatively, there are ways to evaluate overall code coverage if that is the goal.
Given the lack of tests throughout the CLI currently, there doesn't seem to be much of an emphasis on code coverage but the questions are what is the intended purpose of TestMain currently and what is the overall goal of evaluating code coverage throughout the code base?
main_test contains a
TestMain
that evaluates the code coverage percentage whencoverfail
argument is passed. There are a few issues with this:main_test
package so whencoverfail
is passed, the threshold will never be met and therefore thetest
process will always failgo test
withcoverfail
(possibly this is only for internal use?)It is unclear what the intent of
TestMain
is here - is the goal to evaluate code coverage for the entire set of tests across entire codebase or just an individual package? As it stands,TestMain
will only evaluate code coverage for themain
package - using the approach taken to evaluate each individual package would require aTestMain
in every package where code coverage should be evaluated. Alternatively, there are ways to evaluate overall code coverage if that is the goal.Given the lack of tests throughout the CLI currently, there doesn't seem to be much of an emphasis on code coverage but the questions are what is the intended purpose of
TestMain
currently and what is the overall goal of evaluating code coverage throughout the code base?Related #166
The text was updated successfully, but these errors were encountered: