In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these tests failed. This was the cause of the Homebrew/homebrew-test-bot Linux CI failures as it was testing a shallow clone.
brew --cache
brew --cellar
mktmpdir
cmd/cask
brew cat
brew cleanup
cmd/info
brew uninstall
cmd/update-report