mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Simple additions to TestBuildAddTar
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
parent
2d34a08c48
commit
fc2631b499
1 changed files with 4 additions and 2 deletions
|
@ -1733,7 +1733,8 @@ RUN [ "$(cat /testfile)" = 'test!' ]`
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBuildAddTar(t *testing.T) {
|
func TestBuildAddTar(t *testing.T) {
|
||||||
|
name := "testbuildaddtar"
|
||||||
|
defer deleteImages(name)
|
||||||
checkOutput := func(out string) {
|
checkOutput := func(out string) {
|
||||||
n := -1
|
n := -1
|
||||||
x := ""
|
x := ""
|
||||||
|
@ -1756,10 +1757,11 @@ func TestBuildAddTar(t *testing.T) {
|
||||||
|
|
||||||
for _, n := range []string{"1", "2"} {
|
for _, n := range []string{"1", "2"} {
|
||||||
buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestBuildAddTar", n)
|
buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestBuildAddTar", n)
|
||||||
buildCmd := exec.Command(dockerBinary, "build", "-t", "testbuildaddtar", ".")
|
buildCmd := exec.Command(dockerBinary, "build", "-t", name, ".")
|
||||||
buildCmd.Dir = buildDirectory
|
buildCmd.Dir = buildDirectory
|
||||||
out, _, err := runCommandWithOutput(buildCmd)
|
out, _, err := runCommandWithOutput(buildCmd)
|
||||||
errorOut(err, t, fmt.Sprintf("build failed to complete for TestBuildAddTar/%s: %v", n, err))
|
errorOut(err, t, fmt.Sprintf("build failed to complete for TestBuildAddTar/%s: %v", n, err))
|
||||||
checkOutput(out)
|
checkOutput(out)
|
||||||
}
|
}
|
||||||
|
logDone("build - ADD tar")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue