Crashie is a Command-Line Utility that exits with a random exit code after a configurable delay. Use it when you want to test restart behaviors or anything that requires an application to fail.
Sleeping for 12.72 seconds, then exiting with code 130
Exiting with code 130
If you want to randomly fail with a SIGINT (code 130) or SIGKILL (137) after 10 ± 2 seconds, run:
crashie --sigint --sigkill --delay=10 --delay-stddev=2
crashie --signals=2,3 --delay=10 --delay-stddev=2
echo $?
Alternatively, provide options using environment variables:
CRASHIE_SIGNALS=2,3 CRASHIE_SLEEP_DELAY=10 CRASHIE_SLEEP_DELAY_STDDEV=2 crashie
The application is available as the sunside/crashie Docker image. To run crashie via Docker, use e.g.
docker run --rm sunside/crashie --help
Provide command-line arguments as if you were running it locally:
docker run --rm sunside/crashie --sigint --sigkill --delay=10 --delay-stddev=2
echo $?
Alternatively, provide configuration via environment variables:
docker run --rm \
--env CRASHIE_SIGNALS=2,3 \
--env CRASHIE_SLEEP_DELAY=10 \
--env CRASHIE_SLEEP_DELAY_STDDEV=2 \
sunside/crashie
echo $?
To install crashie from crates.io, run
cargo install crashie
To get a documentation, run
cargo run -- --help
Content type
Image
Digest
sha256:855fbe52b…
Size
3.8 MB
Last updated
over 2 years ago
docker pull sunside/crashie