Implement restrictions on default column searching for #268 (#274)

* Implement restrictions on default column searching for #268

* Add better docs for config-set excluded-default-search-columns

* Enable debugging

* Clean up server binaries to avoid wasting disk space

* Add tests

* Swap from configuring excluded columns to configuring included columns, to prep for future changes where we may add support for other default columns

* Reduce gotestsum re-runs since tests are less flaky nowadays

* Fix bug in lib.where(...) function that failed to trim the args list and caused DB query correctness issues

* Disable tmate debugging

* Update goldens
This commit is contained in:
David Dworken
2025-01-18 12:25:07 -07:00
committed by GitHub
parent 23ed840aa3
commit 65d1ebfd07
15 changed files with 220 additions and 17 deletions

View File

@ -280,10 +280,14 @@ func RunTestServer() func() {
panic(fmt.Errorf("expected server stdout to end with %#v, but it doesn't: %#v", expectedSuffix, stdout.String()))
}
return func() {
// Kill the server process to guarantee the next test can run
err := cmd.Process.Kill()
if err != nil && err.Error() != "os: process already finished" {
panic(fmt.Sprintf("failed to kill server process: %v", err))
}
// Delete the built server binary to avoid wasting disk space
_ = os.Remove(fn)
// Now that we've cleaned up, check the output to see if the server had any errors
allOutput := stdout.String() + stderr.String()
if strings.Contains(allOutput, "failed to") && IsOnline() {
panic(fmt.Sprintf("server experienced an error\n\n\nstderr=\n%s\n\n\nstdout=%s", stderr.String(), stdout.String()))