From aa0449c8139afec8e1446bb8650acad886b0a194 Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Thu, 18 Sep 2014 09:02:05 +0400 Subject: [PATCH 1/2] Fix logDone message for TestCopySingleFileToExistDir Signed-off-by: Alexandr Morozov --- integration-cli/docker_cli_build_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index a20ac33735..892154348b 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -322,7 +322,7 @@ func TestCopySingleFileToExistDir(t *testing.T) { deleteImages("testcopyimg") - logDone("build - add single file to existing dir") + logDone("build - copy single file to existing dir") } func TestCopySingleFileToNonExistDir(t *testing.T) { From 184fe67bbc3759307adb6cb3e5338b5325bb88bb Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Thu, 18 Sep 2014 09:09:10 +0400 Subject: [PATCH 2/2] Add Build prefix to Copy tests Now we can do "-run TestBuild" to test all build-tests and "-run TestBuildCopy" for test all copy-tests Signed-off-by: Alexandr Morozov --- integration-cli/docker_cli_build_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 892154348b..d9885aad0f 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -236,7 +236,7 @@ func TestAddEtcToRoot(t *testing.T) { logDone("build - add etc directory to root") } -func TestCopySingleFileToRoot(t *testing.T) { +func TestBuildCopySingleFileToRoot(t *testing.T) { testDirName := "SingleFileToRoot" sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName) buildDirectory, err := ioutil.TempDir("", "test-build-add") @@ -266,7 +266,7 @@ func TestCopySingleFileToRoot(t *testing.T) { } // Issue #3960: "ADD src ." hangs - adapted for COPY -func TestCopySingleFileToWorkdir(t *testing.T) { +func TestBuildCopySingleFileToWorkdir(t *testing.T) { testDirName := "SingleFileToWorkdir" sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName) buildDirectory, err := ioutil.TempDir("", "test-build-add") @@ -311,7 +311,7 @@ func TestCopySingleFileToWorkdir(t *testing.T) { logDone("build - copy single file to workdir") } -func TestCopySingleFileToExistDir(t *testing.T) { +func TestBuildCopySingleFileToExistDir(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "SingleFileToExistDir") errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err)) @@ -325,7 +325,7 @@ func TestCopySingleFileToExistDir(t *testing.T) { logDone("build - copy single file to existing dir") } -func TestCopySingleFileToNonExistDir(t *testing.T) { +func TestBuildCopySingleFileToNonExistDir(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "SingleFileToNonExistDir") errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err)) @@ -339,7 +339,7 @@ func TestCopySingleFileToNonExistDir(t *testing.T) { logDone("build - copy single file to non-existing dir") } -func TestCopyDirContentToRoot(t *testing.T) { +func TestBuildCopyDirContentToRoot(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "DirContentToRoot") errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err)) @@ -353,7 +353,7 @@ func TestCopyDirContentToRoot(t *testing.T) { logDone("build - copy directory contents to root") } -func TestCopyDirContentToExistDir(t *testing.T) { +func TestBuildCopyDirContentToExistDir(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "DirContentToExistDir") errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err)) @@ -367,7 +367,7 @@ func TestCopyDirContentToExistDir(t *testing.T) { logDone("build - copy directory contents to existing dir") } -func TestCopyWholeDirToRoot(t *testing.T) { +func TestBuildCopyWholeDirToRoot(t *testing.T) { testDirName := "WholeDirToRoot" sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName) buildDirectory, err := ioutil.TempDir("", "test-build-add") @@ -400,7 +400,7 @@ func TestCopyWholeDirToRoot(t *testing.T) { logDone("build - copy whole directory to root") } -func TestCopyEtcToRoot(t *testing.T) { +func TestBuildCopyEtcToRoot(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "EtcToRoot") errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err)) @@ -413,7 +413,7 @@ func TestCopyEtcToRoot(t *testing.T) { logDone("build - copy etc directory to root") } -func TestCopyDisallowRemote(t *testing.T) { +func TestBuildCopyDisallowRemote(t *testing.T) { buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy") buildCmd := exec.Command(dockerBinary, "build", "-t", "testcopyimg", "DisallowRemote") buildCmd.Dir = buildDirectory