diff --git a/integration_tests/dockerfiles/Dockerfile_test_workdir b/integration_tests/dockerfiles/Dockerfile_test_workdir index 4fa6b6143..6c89e4c11 100644 --- a/integration_tests/dockerfiles/Dockerfile_test_workdir +++ b/integration_tests/dockerfiles/Dockerfile_test_workdir @@ -1,10 +1,13 @@ FROM gcr.io/google-appengine/debian9:latest COPY context/foo foo WORKDIR /test -WORKDIR workdir -COPY context/foo . -RUN cp foo newfoo +# Test that this will be appended on to the previous command, to create /test/workdir +WORKDIR workdir +COPY context/foo ./currentfoo +# Test that the RUN command will happen in the correct directory +RUN cp currentfoo newfoo WORKDIR /new/dir ENV dir /another/new/dir WORKDIR $dir/newdir +WORKDIR $dir/$doesntexist WORKDIR / diff --git a/integration_tests/integration_test_yaml.go b/integration_tests/integration_test_yaml.go index 1a91eb54d..cda55ac61 100644 --- a/integration_tests/integration_test_yaml.go +++ b/integration_tests/integration_test_yaml.go @@ -29,34 +29,34 @@ var fileTests = []struct { context string repo string }{ - // { - // description: "test extract filesystem", - // dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_extract_fs", - // configPath: "/workspace/integration_tests/dockerfiles/config_test_extract_fs.json", - // context: "integration_tests/dockerfiles/", - // repo: "extract-filesystem", - // }, - // { - // description: "test run", - // dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run", - // configPath: "/workspace/integration_tests/dockerfiles/config_test_run.json", - // context: "integration_tests/dockerfiles/", - // repo: "test-run", - // }, - // { - // description: "test run no files changed", - // dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run_2", - // configPath: "/workspace/integration_tests/dockerfiles/config_test_run_2.json", - // context: "integration_tests/dockerfiles/", - // repo: "test-run-2", - // }, - // { - // description: "test copy", - // dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_copy", - // configPath: "/workspace/integration_tests/dockerfiles/config_test_copy.json", - // context: "/workspace/integration_tests/", - // repo: "test-copy", - // }, + { + description: "test extract filesystem", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_extract_fs", + configPath: "/workspace/integration_tests/dockerfiles/config_test_extract_fs.json", + context: "integration_tests/dockerfiles/", + repo: "extract-filesystem", + }, + { + description: "test run", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run", + configPath: "/workspace/integration_tests/dockerfiles/config_test_run.json", + context: "integration_tests/dockerfiles/", + repo: "test-run", + }, + { + description: "test run no files changed", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run_2", + configPath: "/workspace/integration_tests/dockerfiles/config_test_run_2.json", + context: "integration_tests/dockerfiles/", + repo: "test-run-2", + }, + { + description: "test copy", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_copy", + configPath: "/workspace/integration_tests/dockerfiles/config_test_copy.json", + context: "/workspace/integration_tests/", + repo: "test-copy", + }, { description: "test workdir", dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_workdir", @@ -73,13 +73,13 @@ var structureTests = []struct { dockerBuildContext string repo string }{ - // { - // description: "test env", - // dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_env", - // repo: "test-env", - // dockerBuildContext: "/workspace/integration_tests/dockerfiles/", - // structureTestYamlPath: "/workspace/integration_tests/dockerfiles/test_env.yaml", - // }, + { + description: "test env", + dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_env", + repo: "test-env", + dockerBuildContext: "/workspace/integration_tests/dockerfiles/", + structureTestYamlPath: "/workspace/integration_tests/dockerfiles/test_env.yaml", + }, } type step struct {