diff --git a/integration_tests/context/tars/file b/integration_tests/context/tars/file new file mode 100644 index 000000000..faddca8a8 --- /dev/null +++ b/integration_tests/context/tars/file @@ -0,0 +1 @@ +normal file diff --git a/integration_tests/context/tars/file.bz2 b/integration_tests/context/tars/file.bz2 new file mode 100644 index 000000000..53c13149a Binary files /dev/null and b/integration_tests/context/tars/file.bz2 differ diff --git a/integration_tests/context/tars/file.tar b/integration_tests/context/tars/file.tar new file mode 100644 index 000000000..9fc9a39f5 Binary files /dev/null and b/integration_tests/context/tars/file.tar differ diff --git a/integration_tests/context/tars/file.tar.gz b/integration_tests/context/tars/file.tar.gz new file mode 100644 index 000000000..90f1515dc Binary files /dev/null and b/integration_tests/context/tars/file.tar.gz differ diff --git a/integration_tests/dockerfiles/Dockerfile_test_add b/integration_tests/dockerfiles/Dockerfile_test_add new file mode 100644 index 000000000..6fb9d73a7 --- /dev/null +++ b/integration_tests/dockerfiles/Dockerfile_test_add @@ -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/ diff --git a/integration_tests/dockerfiles/config_test_add.json b/integration_tests/dockerfiles/config_test_add.json new file mode 100644 index 000000000..b6d7a2020 --- /dev/null +++ b/integration_tests/dockerfiles/config_test_add.json @@ -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 + } + } +] \ No newline at end of file diff --git a/integration_tests/integration_test_yaml.go b/integration_tests/integration_test_yaml.go index 3129456ff..abfc03db8 100644 --- a/integration_tests/integration_test_yaml.go +++ b/integration_tests/integration_test_yaml.go @@ -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 {