We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Running Tests

Our current CI doesn't do anything interesting.

A good CI pipeline typically includes:

  • Unit tests
  • Integration tests
  • Styling checks
  • Linting checks
  • Security checks
  • Any other kind of automated test

If any of the tests fail, the build is considered "broken" and the developer is notified (in our case by GitHub) so they can fix it.

Assignment

The Notely repo has, gasp, zero unit tests!

  1. If you're still a little fuzzy on how to write unit tests in Go, I'd highly recommend Dave Cheney's excellent blog post on the subject.

  2. go test ./...
    
    The ./... tells Go to run all tests in the current directory and all subdirectories.

Run and submit the CLI tests from the root of your repo.