Sign inSign up

sunside/crashie

By sunside

Updated over 2 years ago

crashie — a little failure in a box

Image
0

526

sunside/crashie repository overview

💥 crashie — a little failure in a box

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

Usage

Usage Example

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
Running via Docker

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 $?
Local Installation from crates.io

To install crashie from crates.io, run

cargo install crashie

Run from source

To get a documentation, run

cargo run -- --help

Tag summary

Content type

Image

Digest

sha256:855fbe52b

Size

3.8 MB

Last updated

over 2 years ago

docker pull sunside/crashie