x/pkgsite: ./all.bash should attempt to run postgres tests by default #39713
Follow up to #39598:
I think we should do the following:
The text was updated successfully, but these errors were encountered:
Hmm, I'm not sure if I agree. This would once again break
It's true that some test successes are different from others, but that will generally be true for many other reasons. Some tests will require specific programs to be installed, or they might require Linux or Windows to run. Should all of those also fail unless they're actually running properly?
I think you should go the other way around. In
and in the Go code to handle the case where the DB isn't available:
That way, you have the best of both worlds. It's possible for "run all the tests properly" to be done, and you're not messing with people who just want to run the tests on a best-effort basis.
A slight variant is what @bcmills suggested in the original issue, which is to make each TestMain start up a temporary postgres on-demand, and only do the skip-or-error dance when postgres isn't installed, which is less likely to be true than "postgres isn't running".