MCPcopy Create free account
hub / github.com/prometheus/procfs / TestAllProcs

Function TestAllProcs

proc_test.go:41–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestAllProcs(t *testing.T) {
42 procs, err := getProcFixtures(t).AllProcs()
43 if err != nil {
44 t.Fatal(err)
45 }
46 sort.Sort(procs)
47 for i, p := range []*Proc{{PID: 584}, {PID: 26231}} {
48 if want, have := p.PID, procs[i].PID; want != have {
49 t.Errorf("want processes %d, have %d", want, have)
50 }
51 }
52}
53
54func TestCmdLine(t *testing.T) {
55 for _, tt := range []struct {

Callers

nothing calls this directly

Calls 2

getProcFixturesFunction · 0.85
AllProcsMethod · 0.80

Tested by

no test coverage detected