Merge pull request #12037 from twhiteman/master
integration-cli: in TestPsListContainersSize, check for no containers
This commit is contained in:
commit
3683498d6f
1 changed files with 3 additions and 0 deletions
|
@ -286,6 +286,9 @@ func TestPsListContainersSize(t *testing.T) {
|
|||
t.Fatal(out, err)
|
||||
}
|
||||
lines := strings.Split(strings.Trim(out, "\n "), "\n")
|
||||
if len(lines) != 2 {
|
||||
t.Fatalf("Expected 2 lines for 'ps -s -n=1' output, got %d", len(lines))
|
||||
}
|
||||
sizeIndex := strings.Index(lines[0], "SIZE")
|
||||
idIndex := strings.Index(lines[0], "CONTAINER ID")
|
||||
foundID := lines[1][idIndex : idIndex+12]
|
||||
|
|
Loading…
Add table
Reference in a new issue