Documentation ¶
Overview ¶
Package pmtesting provides a simple unit test setup routine.
Usage:
package name import ( "testing" "github.com/safing/portmaster/core/pmtesting" ) func TestMain(m *testing.M) { pmtesting.TestMain(m, module) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestMainWithHooks ¶
func TestMainWithHooks(m *testing.M, module *modules.Module, afterStartFn, beforeStopFn TestHookFunc)
TestMainWithHooks provides a simple unit test setup routine and calls afterStartFn after modules have started and beforeStopFn before modules are shutdown.
Types ¶
type TestHookFunc ¶
type TestHookFunc func() error
TestHookFunc describes the functions passed to TestMainWithHooks.
Click to show internal directories.
Click to hide internal directories.