Skip to content

Commit

Permalink
workdir integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed Mar 26, 2018
1 parent 0787a93 commit cd8dce9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 38 deletions.
8 changes: 5 additions & 3 deletions integration_tests/dockerfiles/Dockerfile_test_workdir
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
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
Expand Down
70 changes: 35 additions & 35 deletions integration_tests/integration_test_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 {
Expand Down

0 comments on commit cd8dce9

Please sign in to comment.