package apply // ForTests points where the host writes units and unpacks daemons at directories a test owns, and // waits nothing between its looks at a unit, until the returned function puts them back. For tests // in other packages that apply a process — the bootstrap's, which checks that what genesis raises is // what the controller's process takes over (novox/hq issue 223). Nothing outside a test calls it. func ForTests(units, daemons string) (restore func()) { wasUnits, wasDaemons, wasSettle, wasHandover := unitDir, daemonRoot, serviceSettle, handoverSettle unitDir, daemonRoot, serviceSettle, handoverSettle = units, daemons, 0, 0 return func() { unitDir, daemonRoot, serviceSettle, handoverSettle = wasUnits, wasDaemons, wasSettle, wasHandover } }