1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39819 from thaJeztah/fix_getContainerCount

integration-cli: getContainerCount() fix trimming prefix
This commit is contained in:
Sebastiaan van Stijn 2019-09-05 02:24:14 +02:00 committed by GitHub
commit c5ca284a85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ func getContainerCount(c *check.C) int {
for _, line := range lines {
if strings.Contains(line, containers) {
output := strings.TrimSpace(line)
output = strings.TrimLeft(output, containers)
output = strings.TrimPrefix(output, containers)
output = strings.Trim(output, " ")
containerCount, err := strconv.Atoi(output)
assert.NilError(c, err)