Skip to content

Commit

Permalink
Fix walker_linux_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbourgon committed Jul 16, 2015
1 parent b68e699 commit 6e4495b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions probe/process/walker_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"
"time"

"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/test"
)

Expand Down Expand Up @@ -70,16 +71,16 @@ func TestWalker(t *testing.T) {
return nil, fmt.Errorf("not found")
}

want := map[int]*process.Process{
want := map[int]process.Process{
3: {PID: 3, PPID: 2, Comm: "curl", Cmdline: "curl google.com", Threads: 1},
2: {PID: 2, PPID: 1, Comm: "bash", Cmdline: "", Threads: 1},
4: {PID: 4, PPID: 3, Comm: "apache", Cmdline: "", Threads: 1},
1: {PID: 1, PPID: 0, Comm: "init", Cmdline: "", Threads: 1},
}

have := map[int]*process.Process{}
have := map[int]process.Process{}
walker := process.NewWalker("unused")
err := walker.Walk(func(p *process.Process) {
err := walker.Walk(func(p process.Process) {
have[p.PID] = p
})

Expand Down

0 comments on commit 6e4495b

Please sign in to comment.