jonog / redalert

:rocket: continuously test all the things - trigger alerts on failure :boom:
MIT License
90 stars 16 forks source link

add ability to compare exit codes and output of command checks #22

Closed ubergesundheit closed 8 years ago

ubergesundheit commented 8 years ago

This pull request adds the ability to specify the expected output of commands or the expected exit code.

jonog commented 8 years ago

apologies, must have missed the notification and didn't see this PR @ubergesundheit. will review and incorporate or give feedback shortly!

jonog commented 8 years ago

hi @ubergesundheit thanks for contributing this one - i've now added (in #24) a more generic way of defining 'assertions' against 3 types of data a check now returns (metrics, metadata, response). also helps separate errors while performing a check, and a check not meeting the expected requirements. after that goes in, command.go will need some refinements to capture both the exit code (as metadata) and command output. given the slightly different direction i'll probably close this one, sorry!