mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Only start needed modules for tests
This commit is contained in:
parent
466210b613
commit
bbab3f11b0
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ func TestMain(m *testing.M, module *modules.Module) {
|
|||
// afterStartFn after modules have started and beforeStopFn before modules
|
||||
// are shutdown.
|
||||
func TestMainWithHooks(m *testing.M, module *modules.Module, afterStartFn, beforeStopFn TestHookFunc) {
|
||||
// enable module for testing
|
||||
// Only enable needed modules.
|
||||
modules.EnableModuleManagement(nil)
|
||||
|
||||
// Enable this module for testing.
|
||||
if module != nil {
|
||||
module.Enable()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue