| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "reasonix/internal/control" |
| 7 | ) |
| 8 | |
| 9 | // newFixtureController binds writable session ownership to the test lifetime. |
| 10 | // Register after creating the fixture directories so Close runs before their |
| 11 | // cleanup; Windows correctly refuses to remove an open ownership lock. |
| 12 | func newFixtureController(t *testing.T, opts control.Options) *control.Controller { |
| 13 | t.Helper() |
| 14 | ctrl := control.New(opts) |
| 15 | t.Cleanup(ctrl.Close) |
| 16 | return ctrl |
| 17 | } |
| 18 |