Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean

[test-integration] clean some runCommandWithOutput
This commit is contained in:
Sebastiaan van Stijn
2017-01-10 15:56:42 +01:00
committed by GitHub
27 changed files with 696 additions and 1102 deletions

View File

@@ -5,7 +5,6 @@ import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
@@ -15,6 +14,7 @@ import (
"github.com/docker/distribution/manifest/manifestlist"
"github.com/docker/distribution/manifest/schema2"
"github.com/docker/docker/integration-cli/checker"
icmd "github.com/docker/docker/pkg/testutil/cmd"
"github.com/go-check/check"
"github.com/opencontainers/go-digest"
)
@@ -87,8 +87,8 @@ func testConcurrentPullWholeRepo(c *check.C) {
for i := 0; i != numPulls; i++ {
go func() {
_, _, err := runCommandWithOutput(exec.Command(dockerBinary, "pull", "-a", repoName))
results <- err
result := icmd.RunCommand(dockerBinary, "pull", "-a", repoName)
results <- result.Error
}()
}
@@ -125,8 +125,8 @@ func testConcurrentFailingPull(c *check.C) {
for i := 0; i != numPulls; i++ {
go func() {
_, _, err := runCommandWithOutput(exec.Command(dockerBinary, "pull", repoName+":asdfasdf"))
results <- err
result := icmd.RunCommand(dockerBinary, "pull", repoName+":asdfasdf")
results <- result.Error
}()
}
@@ -175,8 +175,8 @@ func testConcurrentPullMultipleTags(c *check.C) {
for _, repo := range repos {
go func(repo string) {
_, _, err := runCommandWithOutput(exec.Command(dockerBinary, "pull", repo))
results <- err
result := icmd.RunCommand(dockerBinary, "pull", repo)
results <- result.Error
}(repo)
}