test improvements (#5741)

## Summary
Some test improvements:

- disable the race detector on macos, which currently results in a ton
of linking errors, and I think doing race detection on linux is
sufficient to find stuff
- add build tags to the `integration` folder so it's not included by
default when running `go test ./...`
- remove some unused stuff in the Makefile
- change the file `testenv` searches for from `.git` to `go.mod` which
allows test caching to work more reliably
- remove the test for orphaned connections in postgres. It doesn't
actually make sense because we have listener connections in the
background. I think it was racy.
- fix yarn caching


## Checklist

- [ ] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
This commit is contained in:
Caleb Doxsey 2025-07-23 14:07:11 -06:00 committed by GitHub
parent f1ed893e10
commit 9471527a35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 28 deletions

View file

@ -366,7 +366,7 @@ func New(t testing.TB, opts ...EnvironmentOption) Environment {
workspaceFolder, err := os.Getwd()
require.NoError(t, err)
for {
if _, err := os.Stat(filepath.Join(workspaceFolder, ".git")); err == nil {
if _, err := os.Stat(filepath.Join(workspaceFolder, "go.mod")); err == nil {
break
}
workspaceFolder = filepath.Dir(workspaceFolder)