Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
| ... | ... |
@@ -286,6 +286,9 @@ func TestPsListContainersSize(t *testing.T) {
|
| 286 | 286 |
t.Fatal(out, err) |
| 287 | 287 |
} |
| 288 | 288 |
lines := strings.Split(strings.Trim(out, "\n "), "\n") |
| 289 |
+ if len(lines) != 2 {
|
|
| 290 |
+ t.Fatalf("Expected 2 lines for 'ps -s -n=1' output, got %d", len(lines))
|
|
| 291 |
+ } |
|
| 289 | 292 |
sizeIndex := strings.Index(lines[0], "SIZE") |
| 290 | 293 |
idIndex := strings.Index(lines[0], "CONTAINER ID") |
| 291 | 294 |
foundID := lines[1][idIndex : idIndex+12] |