Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 771 Bytes

HOWTO.md

File metadata and controls

28 lines (22 loc) · 771 Bytes

Bats test

Bats is a bash testing framework. Toml bombadil use it in docker to write realistic test cases without breaking your workstation dotfiles.

  1. 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.

  2. Build the test container docker build -t bombadil-tests ./

  3. 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
  1. Submit a PR to the current release candidate branch.