Add cmd integration test

This commit is contained in:
Priya Wadhwa 2018-03-28 13:35:13 -07:00
parent a6b971f8e6
commit 56519c913d
No known key found for this signature in database
GPG Key ID: 0D0DAFD8F7AA73AE
7 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1 @@
normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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/

View File

@ -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
}
}
]

View File

@ -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 {