Browse code

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 <lk4d4@docker.com>

Alexandr Morozov authored on 2014/09/18 14:09:10
Showing 1 changed files
... ...
@@ -236,7 +236,7 @@ func TestAddEtcToRoot(t *testing.T) {
236 236
 	logDone("build - add etc directory to root")
237 237
 }
238 238
 
239
-func TestCopySingleFileToRoot(t *testing.T) {
239
+func TestBuildCopySingleFileToRoot(t *testing.T) {
240 240
 	testDirName := "SingleFileToRoot"
241 241
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName)
242 242
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -266,7 +266,7 @@ func TestCopySingleFileToRoot(t *testing.T) {
266 266
 }
267 267
 
268 268
 // Issue #3960: "ADD src ." hangs - adapted for COPY
269
-func TestCopySingleFileToWorkdir(t *testing.T) {
269
+func TestBuildCopySingleFileToWorkdir(t *testing.T) {
270 270
 	testDirName := "SingleFileToWorkdir"
271 271
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName)
272 272
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -311,7 +311,7 @@ func TestCopySingleFileToWorkdir(t *testing.T) {
311 311
 	logDone("build - copy single file to workdir")
312 312
 }
313 313
 
314
-func TestCopySingleFileToExistDir(t *testing.T) {
314
+func TestBuildCopySingleFileToExistDir(t *testing.T) {
315 315
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
316 316
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "SingleFileToExistDir")
317 317
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -325,7 +325,7 @@ func TestCopySingleFileToExistDir(t *testing.T) {
325 325
 	logDone("build - copy single file to existing dir")
326 326
 }
327 327
 
328
-func TestCopySingleFileToNonExistDir(t *testing.T) {
328
+func TestBuildCopySingleFileToNonExistDir(t *testing.T) {
329 329
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
330 330
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "SingleFileToNonExistDir")
331 331
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -339,7 +339,7 @@ func TestCopySingleFileToNonExistDir(t *testing.T) {
339 339
 	logDone("build - copy single file to non-existing dir")
340 340
 }
341 341
 
342
-func TestCopyDirContentToRoot(t *testing.T) {
342
+func TestBuildCopyDirContentToRoot(t *testing.T) {
343 343
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
344 344
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "DirContentToRoot")
345 345
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -353,7 +353,7 @@ func TestCopyDirContentToRoot(t *testing.T) {
353 353
 	logDone("build - copy directory contents to root")
354 354
 }
355 355
 
356
-func TestCopyDirContentToExistDir(t *testing.T) {
356
+func TestBuildCopyDirContentToExistDir(t *testing.T) {
357 357
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
358 358
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "DirContentToExistDir")
359 359
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -367,7 +367,7 @@ func TestCopyDirContentToExistDir(t *testing.T) {
367 367
 	logDone("build - copy directory contents to existing dir")
368 368
 }
369 369
 
370
-func TestCopyWholeDirToRoot(t *testing.T) {
370
+func TestBuildCopyWholeDirToRoot(t *testing.T) {
371 371
 	testDirName := "WholeDirToRoot"
372 372
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy", testDirName)
373 373
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -400,7 +400,7 @@ func TestCopyWholeDirToRoot(t *testing.T) {
400 400
 	logDone("build - copy whole directory to root")
401 401
 }
402 402
 
403
-func TestCopyEtcToRoot(t *testing.T) {
403
+func TestBuildCopyEtcToRoot(t *testing.T) {
404 404
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
405 405
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testcopyimg", "EtcToRoot")
406 406
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -413,7 +413,7 @@ func TestCopyEtcToRoot(t *testing.T) {
413 413
 	logDone("build - copy etc directory to root")
414 414
 }
415 415
 
416
-func TestCopyDisallowRemote(t *testing.T) {
416
+func TestBuildCopyDisallowRemote(t *testing.T) {
417 417
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
418 418
 	buildCmd := exec.Command(dockerBinary, "build", "-t", "testcopyimg", "DisallowRemote")
419 419
 	buildCmd.Dir = buildDirectory