(t *testing.T, userns bool)
| 36 | } |
| 37 | |
| 38 | func testExecPS(t *testing.T, userns bool) { |
| 39 | if testing.Short() { |
| 40 | return |
| 41 | } |
| 42 | config := newTemplateConfig(t, &tParam{userns: userns}) |
| 43 | |
| 44 | buffers := runContainerOk(t, config, "ps", "-o", "pid,user,comm") |
| 45 | lines := strings.Split(buffers.Stdout.String(), "\n") |
| 46 | if len(lines) < 2 { |
| 47 | t.Fatalf("more than one process running for output %q", buffers.Stdout.String()) |
| 48 | } |
| 49 | expected := `1 root ps` |
| 50 | actual := strings.Trim(lines[1], "\n ") |
| 51 | if actual != expected { |
| 52 | t.Fatalf("expected output %q but received %q", expected, actual) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func TestIPCPrivate(t *testing.T) { |
| 57 | if testing.Short() { |
no test coverage detected
searching dependent graphs…