Bats is a bash testing framework. Toml bombadil use it in docker to write realistic test cases without breaking your workstation dotfiles.
-
Write a new bat test in tests.bat for example :
@test "Print version" { run bombadil --version assert_success }
If you need to add some dotfiles to the docker user home, everything resides in
tom_home
. -
Build the test container
docker build -t bombadil-tests ./
-
Run it
docker run -it bombadil-tests
:
❯ docker run -it bombadil-tests
✓ Print help
✓ Print version
✓ Symlink bombadil config
✓ Links dots
4 tests, 0 failures
- Submit a PR to the current release candidate branch.