The TestStressNoUniqueConstraintViolations test was creating 1000 test issues in the project's real database instead of its temp database. Root cause: The RPC client automatically sets req.Cwd to os.Getwd() when not explicitly provided. The server's getStorageForRequest() then uses findDatabaseForCwd() to locate and open the database for that working directory. Since the test ran from the project directory, it discovered and used .beads/bd.db instead of the temp database. Fix: Change working directory to the temp directory before running the test, so the client's automatic Cwd detection points to the temp .beads/ directory instead of the project's. Also ensures .beads subdirectory exists in temp dir for proper discovery.
9.7 KiB
9.7 KiB