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:
commit
c5ca284a85
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ func getContainerCount(c *check.C) int {
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
if strings.Contains(line, containers) {
|
if strings.Contains(line, containers) {
|
||||||
output := strings.TrimSpace(line)
|
output := strings.TrimSpace(line)
|
||||||
output = strings.TrimLeft(output, containers)
|
output = strings.TrimPrefix(output, containers)
|
||||||
output = strings.Trim(output, " ")
|
output = strings.Trim(output, " ")
|
||||||
containerCount, err := strconv.Atoi(output)
|
containerCount, err := strconv.Atoi(output)
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue