MCPcopy
hub / github.com/safing/portmaster / TestDebug

Function TestDebug

service/debug_test.go:11–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestDebug(t *testing.T) {
12 t.Parallel()
13
14 // Create test instance with at least one worker.
15 i := &Instance{}
16 n, err := notifications.New(i)
17 if err != nil {
18 t.Fatal(err)
19 }
20 i.serviceGroup = mgr.NewGroup(n)
21 i.SpnGroup = mgr.NewExtendedGroup()
22 err = i.Start()
23 if err != nil {
24 t.Fatal(err)
25 }
26 time.Sleep(100 * time.Millisecond)
27
28 info, err := i.GetWorkerInfo()
29 if err != nil {
30 t.Fatal(err)
31 }
32 t.Log(info)
33}

Callers

nothing calls this directly

Calls 6

StartMethod · 0.95
GetWorkerInfoMethod · 0.95
NewFunction · 0.92
NewGroupFunction · 0.92
NewExtendedGroupFunction · 0.92
LogMethod · 0.45

Tested by

no test coverage detected