From e3b7b451f5fcd9bd0a4dcfab69d289f6a21418be Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Wed, 11 Apr 2018 14:06:35 -0700 Subject: [PATCH] added test for pulling from docker registry --- .../dockerfiles/Dockerfile_test_registry | 2 ++ .../dockerfiles/config_test_registry.json | 12 ++++++++++++ integration_tests/dockerfiles/config_test_run.json | 8 ++++---- integration_tests/integration_test_yaml.go | 8 ++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 integration_tests/dockerfiles/Dockerfile_test_registry create mode 100644 integration_tests/dockerfiles/config_test_registry.json diff --git a/integration_tests/dockerfiles/Dockerfile_test_registry b/integration_tests/dockerfiles/Dockerfile_test_registry new file mode 100644 index 000000000..67feb704a --- /dev/null +++ b/integration_tests/dockerfiles/Dockerfile_test_registry @@ -0,0 +1,2 @@ +FROM busybox +RUN echo "hey" > /hey diff --git a/integration_tests/dockerfiles/config_test_registry.json b/integration_tests/dockerfiles/config_test_registry.json new file mode 100644 index 000000000..5674ccbed --- /dev/null +++ b/integration_tests/dockerfiles/config_test_registry.json @@ -0,0 +1,12 @@ +[ + { + "Image1": "gcr.io/kbuild-test/docker-test-registry:latest", + "Image2": "gcr.io/kbuild-test/kbuild-test-registry:latest", + "DiffType": "File", + "Diff": { + "Adds": null, + "Dels": null, + "Mods": null + } + } +] \ No newline at end of file diff --git a/integration_tests/dockerfiles/config_test_run.json b/integration_tests/dockerfiles/config_test_run.json index 19cab3219..7715d8a57 100644 --- a/integration_tests/dockerfiles/config_test_run.json +++ b/integration_tests/dockerfiles/config_test_run.json @@ -14,8 +14,8 @@ }, { "Name": "/var/log/apt/term.log", - "Size1": 24421, - "Size2": 24421 + "Size1": 23671, + "Size2": 23671 }, { "Name": "/var/cache/ldconfig/aux-cache", @@ -24,8 +24,8 @@ }, { "Name": "/var/log/apt/history.log", - "Size1": 5415, - "Size2": 5415 + "Size1": 5661, + "Size2": 5661 }, { "Name": "/var/log/alternatives.log", diff --git a/integration_tests/integration_test_yaml.go b/integration_tests/integration_test_yaml.go index 3616d219a..e2797baac 100644 --- a/integration_tests/integration_test_yaml.go +++ b/integration_tests/integration_test_yaml.go @@ -110,6 +110,14 @@ var fileTests = []struct { kbuildContext: buildcontextPath, repo: "test-add", }, + { + description: "test registry", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_registry", + configPath: "/workspace/integration_tests/dockerfiles/config_test_registry.json", + dockerContext: buildcontextPath, + kbuildContext: buildcontextPath, + repo: "test-registry", + }, } var structureTests = []struct {