Browse code

Use prefix naming for build tests

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>

Alexandr Morozov authored on 2014/09/19 21:33:57
Showing 1 changed files
... ...
@@ -59,7 +59,7 @@ func TestBuildSixtySteps(t *testing.T) {
59 59
 	logDone("build - build an image with sixty build steps")
60 60
 }
61 61
 
62
-func TestAddSingleFileToRoot(t *testing.T) {
62
+func TestBuildAddSingleFileToRoot(t *testing.T) {
63 63
 	testDirName := "SingleFileToRoot"
64 64
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd", testDirName)
65 65
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -89,7 +89,7 @@ func TestAddSingleFileToRoot(t *testing.T) {
89 89
 }
90 90
 
91 91
 // Issue #3960: "ADD src ." hangs
92
-func TestAddSingleFileToWorkdir(t *testing.T) {
92
+func TestBuildAddSingleFileToWorkdir(t *testing.T) {
93 93
 	testDirName := "SingleFileToWorkdir"
94 94
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd", testDirName)
95 95
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -134,7 +134,7 @@ func TestAddSingleFileToWorkdir(t *testing.T) {
134 134
 	logDone("build - add single file to workdir")
135 135
 }
136 136
 
137
-func TestAddSingleFileToExistDir(t *testing.T) {
137
+func TestBuildAddSingleFileToExistDir(t *testing.T) {
138 138
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd")
139 139
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "SingleFileToExistDir")
140 140
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -148,7 +148,7 @@ func TestAddSingleFileToExistDir(t *testing.T) {
148 148
 	logDone("build - add single file to existing dir")
149 149
 }
150 150
 
151
-func TestMultipleFiles(t *testing.T) {
151
+func TestBuildCopyAddMultipleFiles(t *testing.T) {
152 152
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestCopy")
153 153
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "MultipleFiles")
154 154
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -162,7 +162,7 @@ func TestMultipleFiles(t *testing.T) {
162 162
 	logDone("build - mulitple file copy/add tests")
163 163
 }
164 164
 
165
-func TestAddMultipleFilesToFile(t *testing.T) {
165
+func TestBuildAddMultipleFilesToFile(t *testing.T) {
166 166
 	name := "testaddmultiplefilestofile"
167 167
 	defer deleteImages(name)
168 168
 	ctx, err := fakeContext(`FROM scratch
... ...
@@ -185,7 +185,7 @@ func TestAddMultipleFilesToFile(t *testing.T) {
185 185
 	logDone("build - multiple add files to file")
186 186
 }
187 187
 
188
-func TestCopyMultipleFilesToFile(t *testing.T) {
188
+func TestBuildCopyMultipleFilesToFile(t *testing.T) {
189 189
 	name := "testcopymultiplefilestofile"
190 190
 	defer deleteImages(name)
191 191
 	ctx, err := fakeContext(`FROM scratch
... ...
@@ -208,7 +208,7 @@ func TestCopyMultipleFilesToFile(t *testing.T) {
208 208
 	logDone("build - multiple copy files to file")
209 209
 }
210 210
 
211
-func TestAddSingleFileToNonExistDir(t *testing.T) {
211
+func TestBuildAddSingleFileToNonExistDir(t *testing.T) {
212 212
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd")
213 213
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "SingleFileToNonExistDir")
214 214
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -222,7 +222,7 @@ func TestAddSingleFileToNonExistDir(t *testing.T) {
222 222
 	logDone("build - add single file to non-existing dir")
223 223
 }
224 224
 
225
-func TestAddDirContentToRoot(t *testing.T) {
225
+func TestBuildAddDirContentToRoot(t *testing.T) {
226 226
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd")
227 227
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "DirContentToRoot")
228 228
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -236,7 +236,7 @@ func TestAddDirContentToRoot(t *testing.T) {
236 236
 	logDone("build - add directory contents to root")
237 237
 }
238 238
 
239
-func TestAddDirContentToExistDir(t *testing.T) {
239
+func TestBuildAddDirContentToExistDir(t *testing.T) {
240 240
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd")
241 241
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "DirContentToExistDir")
242 242
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -250,7 +250,7 @@ func TestAddDirContentToExistDir(t *testing.T) {
250 250
 	logDone("build - add directory contents to existing dir")
251 251
 }
252 252
 
253
-func TestAddWholeDirToRoot(t *testing.T) {
253
+func TestBuildAddWholeDirToRoot(t *testing.T) {
254 254
 	testDirName := "WholeDirToRoot"
255 255
 	sourceDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd", testDirName)
256 256
 	buildDirectory, err := ioutil.TempDir("", "test-build-add")
... ...
@@ -283,7 +283,7 @@ func TestAddWholeDirToRoot(t *testing.T) {
283 283
 	logDone("build - add whole directory to root")
284 284
 }
285 285
 
286
-func TestAddEtcToRoot(t *testing.T) {
286
+func TestBuildAddEtcToRoot(t *testing.T) {
287 287
 	buildDirectory := filepath.Join(workingDirectory, "build_tests", "TestAdd")
288 288
 	out, exitCode, err := dockerCmdInDir(t, buildDirectory, "build", "-t", "testaddimg", "EtcToRoot")
289 289
 	errorOut(err, t, fmt.Sprintf("build failed to complete: %v %v", out, err))
... ...
@@ -1384,11 +1384,11 @@ func testContextTar(t *testing.T, compression archive.Compression) {
1384 1384
 	logDone(fmt.Sprintf("build - build an image with a context tar, compression: %v", compression))
1385 1385
 }
1386 1386
 
1387
-func TestContextTarGzip(t *testing.T) {
1387
+func TestBuildContextTarGzip(t *testing.T) {
1388 1388
 	testContextTar(t, archive.Gzip)
1389 1389
 }
1390 1390
 
1391
-func TestContextTarNoCompression(t *testing.T) {
1391
+func TestBuildContextTarNoCompression(t *testing.T) {
1392 1392
 	testContextTar(t, archive.Uncompressed)
1393 1393
 }
1394 1394
 
... ...
@@ -1747,7 +1747,7 @@ docker.com>"
1747 1747
 	logDone("build - validate escaping whitespace")
1748 1748
 }
1749 1749
 
1750
-func TestDockerignore(t *testing.T) {
1750
+func TestBuildDockerignore(t *testing.T) {
1751 1751
 	name := "testbuilddockerignore"
1752 1752
 	defer deleteImages(name)
1753 1753
 	dockerfile := `
... ...
@@ -1778,7 +1778,7 @@ func TestDockerignore(t *testing.T) {
1778 1778
 	logDone("build - test .dockerignore")
1779 1779
 }
1780 1780
 
1781
-func TestDockerignoringDockerfile(t *testing.T) {
1781
+func TestBuildDockerignoringDockerfile(t *testing.T) {
1782 1782
 	name := "testbuilddockerignoredockerfile"
1783 1783
 	defer deleteImages(name)
1784 1784
 	dockerfile := `
... ...
@@ -1797,7 +1797,7 @@ func TestDockerignoringDockerfile(t *testing.T) {
1797 1797
 	logDone("build - test .dockerignore of Dockerfile")
1798 1798
 }
1799 1799
 
1800
-func TestDockerignoringWholeDir(t *testing.T) {
1800
+func TestBuildDockerignoringWholeDir(t *testing.T) {
1801 1801
 	name := "testbuilddockerignorewholedir"
1802 1802
 	defer deleteImages(name)
1803 1803
 	dockerfile := `