mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
98ed022428
TestPatrolAutopilotStoreUnavailableDoesNotChangeModeOrFabricateEvidence built its request through patrolAutopilotSessionRequest, which writes a session into the process-global store, but never initialized one. Run alone it panicked in GetSessionStore; in the package run it passed only because an earlier test left a store behind. The rest of the file got its store from newPatrolAutopilotTestHandler, which called InitSessionStore on a t.TempDir() and never cleared it, so these tests were also the ones leaving a store pointed at a deleted directory for whatever ran next. Both now go through initPatrolAutopilotSessionStore, which follows the package's existing resetSessionStoreForTests/t.Cleanup pattern: start from no store, initialize one on a temp dir, and clear it when the test ends. Every test in the file passes when run alone.