Closed joshraker closed 5 years ago
Still need to write tests but I figured I'd get it out here where it can be reviewed. Right now the commands exit with the same code as the failed postgres command (psql
or pg_dump
). If we just need it to exit with a non-zero code we can raise a Thor::Error
like we normally do but the exit code will always be 1.
Merging #251 into master will increase coverage by
0.15%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #251 +/- ##
==========================================
+ Coverage 97.21% 97.37% +0.15%
==========================================
Files 81 81
Lines 3486 3543 +57
==========================================
+ Hits 3389 3450 +61
+ Misses 97 93 -4
Impacted Files | Coverage Δ | |
---|---|---|
spec/aptible/cli/subcommands/db_spec.rb | 100% <100%> (ø) |
:arrow_up: |
lib/aptible/cli/subcommands/db.rb | 97.5% <100%> (+2.66%) |
:arrow_up: |
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 a4604b8...ed9c3a0. Read the comment docs.
Confirmed we want the commands to bubble up the same exit code.
@UserNotFound I added tests for db:execute
. Let me know if I violated any of our code style/norms.
@UserNotFound bump
https://aptible.zendesk.com/agent/tickets/19602
Also adds
--on-error-stop
flag todb:execute
to makepsql
stop on error and return a non-zero exit code.