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

Catch early-exit errors in Kaocha.repl #265

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Conversation

alysbrooks
Copy link
Member

@alysbrooks alysbrooks commented Jan 11, 2022

Addresses #231 by adding a basic message instead of letting errors bubble up.

I found calling kaocha.repl/run with a fake test-id was an easy way to trigger an early-exit error.

@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #265 (f59801b) into main (b6f5825) will decrease coverage by 0.28%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
- Coverage   75.91%   75.62%   -0.29%     
==========================================
  Files          51       51              
  Lines        2649     2659      +10     
  Branches      246      246              
==========================================
  Hits         2011     2011              
- Misses        485      495      +10     
  Partials      153      153              
Flag Coverage Δ
integration 57.61% <0.00%> (-0.22%) ⬇️
unit 69.34% <0.00%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/kaocha/repl.clj 36.36% <0.00%> (-8.09%) ⬇️

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 b6f5825...f59801b. Read the comment docs.

(catch :kaocha/early-exit {exit-code :kaocha/early-exit}
(if (not= exit-code 0)
(output/error "Test run exited with code " exit-code)
(output/warn "Test run exited with code " exit-code))
Copy link
Member

Choose a reason for hiding this comment

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

do we ever :early-exit with code 0? Seems contradictory.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, probably. We do if no tests are found (its own issue #211) and in the kaocha.plugin.alpha.info plugin.

@plexus
Copy link
Member

plexus commented Jan 12, 2022

Looks good! definitely an improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants