Commit Graph

2 Commits

Author SHA1 Message Date
Abhinav Gupta 975eaa6220
test(regress-13301): Avoid accidental tidying
The regression test for  needs an intentionally bad go.mod file.
This file was excluded from `make tidy`, allowing it to remain invalid,
but this doesn't protect it from bulk commands like the following
used in 

```bash
find . -name go.mod -exec dirname '{}' ';' | while read R; do
  (cd "$R" && ... && go mod tidy)
done
```

In fact,  accidentally tidied this go.mod file
(removing the extraneous dependencies critical to the regression test)
and failed in CI.

To prevent issues like this, rename the go.mod to go.mod.bad,
and rename it back to go.mod in the test environment at test time.

This also lets us revert the `make tidy` exclusion support in tidy.sh.
2023-07-26 13:05:31 -07:00
Abhinav Gupta 7165d1efb4
Add regression test for
Adds a regression of the bug using code provided by @phillipedwards.
The reproduction is a bit complicated because of the very specific
scenario we need to replicate here.

Additionally, we need an untidy go.mod file for this,
so we need to teach scripts/tidy.sh how to ignore files.
2023-07-11 16:22:15 -07:00