Add cmd integration test
This commit is contained in:
		
							parent
							
								
									a6b971f8e6
								
							
						
					
					
						commit
						56519c913d
					
				|  | @ -0,0 +1 @@ | |||
| normal file | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -0,0 +1,18 @@ | |||
| FROM gcr.io/google-appengine/debian9:latest | ||||
| # First, try adding some regular files | ||||
| ADD context/foo foo | ||||
| ADD context/foo /foodir/ | ||||
| ADD context/bar/b* bar/ | ||||
| ADD . newdir | ||||
| ADD ["context/foo", "/tmp/foo" ] | ||||
| 
 | ||||
| # Next, make sure environment replacement works | ||||
| ENV contextenv ./context | ||||
| ADD $contextenv/* /tmp/${contextenv}/ | ||||
| 
 | ||||
| # Now, test extracting local tar archives | ||||
| ADD context/tars/fil* /tars/ | ||||
| ADD context/tars/file.tar /tars_again | ||||
| 
 | ||||
| # Finally, test adding a remote URL, concurrently with a normal file | ||||
| ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3/docker-credential-gcr_linux_386-1.4.3.tar.gz context/foo /test/all/ | ||||
|  | @ -0,0 +1,12 @@ | |||
| [ | ||||
|   { | ||||
|     "Image1": "gcr.io/kbuild-test/docker-test-add:latest", | ||||
|     "Image2": "gcr.io/kbuild-test/kbuild-test-add:latest", | ||||
|     "DiffType": "File", | ||||
|     "Diff": { | ||||
|       "Adds": null, | ||||
|       "Dels": null, | ||||
|       "Mods": null | ||||
|     } | ||||
|   } | ||||
| ] | ||||
|  | @ -57,6 +57,13 @@ var fileTests = []struct { | |||
| 		context:        "/workspace/integration_tests/", | ||||
| 		repo:           "test-copy", | ||||
| 	}, | ||||
| 	{ | ||||
| 		description:    "test add", | ||||
| 		dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_add", | ||||
| 		configPath:     "/workspace/integration_tests/dockerfiles/config_test_add.json", | ||||
| 		context:        "/workspace/integration_tests/", | ||||
| 		repo:           "test-add", | ||||
| 	}, | ||||
| } | ||||
| 
 | ||||
| var structureTests = []struct { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue