While we're here, also add `brew tests --no-parallel` which I relied
on during testing.
Pretty much anywhere we rely on a stubbed formula on disk to work: we
need to disable the API.
This PR removes all remaining unnecessary cache clearing in tests
from the codebase since we now clear all cachable classes between
tests making this functionally unnecessary.
Original PR to automatically clear caches:
- https://github.com/Homebrew/brew/pull/16746
I also moved the `Utils::Analytics` module to use cachable so
that we don't have to clear caches specifically in tests anymore.
Rather than failing every time we fail to update (breaking most usage
while offline) instead only fail if we cannot obtain the JSON and we
don't have a valid local file we can use.
Also tweak the timeout and retry logic and values to make a bit more
sense in this context and not be so noisy when offline.