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

Function TestComm

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

Source from the content-addressed store, hash-verified

97}
98
99func TestComm(t *testing.T) {
100 for _, tt := range []struct {
101 process int
102 want string
103 }{
104 {process: 26231, want: "vim"},
105 {process: 26232, want: "ata_sff"},
106 } {
107 p1, err := getProcFixtures(t).Proc(tt.process)
108 if err != nil {
109 t.Fatal(err)
110 }
111 c1, err := p1.Comm()
112 if err != nil {
113 t.Fatal(err)
114 }
115 if diff := cmp.Diff(tt.want, c1); diff != "" {
116 t.Fatalf("unexpected comm (-want +got):\n%s", diff)
117 }
118 }
119}
120
121func TestExecutable(t *testing.T) {
122 for _, tt := range []struct {

Callers

nothing calls this directly

Calls 3

getProcFixturesFunction · 0.85
ProcMethod · 0.80
CommMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…