workdir integration test
This commit is contained in:
parent
0787a93372
commit
a5a84ed552
|
|
@ -1,10 +1,13 @@
|
||||||
FROM gcr.io/google-appengine/debian9:latest
|
FROM gcr.io/google-appengine/debian9:latest
|
||||||
COPY context/foo foo
|
COPY context/foo foo
|
||||||
WORKDIR /test
|
WORKDIR /test
|
||||||
WORKDIR workdir
|
# Test that this will be appended on to the previous command, to create /test/workdir
|
||||||
COPY context/foo .
|
WORKDIR workdir
|
||||||
RUN cp foo newfoo
|
COPY context/foo ./currentfoo
|
||||||
|
# Test that the RUN command will happen in the correct directory
|
||||||
|
RUN cp currentfoo newfoo
|
||||||
WORKDIR /new/dir
|
WORKDIR /new/dir
|
||||||
ENV dir /another/new/dir
|
ENV dir /another/new/dir
|
||||||
WORKDIR $dir/newdir
|
WORKDIR $dir/newdir
|
||||||
|
WORKDIR $dir/$doesntexist
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
|
||||||
|
|
@ -29,34 +29,34 @@ var fileTests = []struct {
|
||||||
context string
|
context string
|
||||||
repo string
|
repo string
|
||||||
}{
|
}{
|
||||||
// {
|
{
|
||||||
// description: "test extract filesystem",
|
description: "test extract filesystem",
|
||||||
// dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_extract_fs",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_extract_fs",
|
||||||
// configPath: "/workspace/integration_tests/dockerfiles/config_test_extract_fs.json",
|
configPath: "/workspace/integration_tests/dockerfiles/config_test_extract_fs.json",
|
||||||
// context: "integration_tests/dockerfiles/",
|
context: "integration_tests/dockerfiles/",
|
||||||
// repo: "extract-filesystem",
|
repo: "extract-filesystem",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// description: "test run",
|
description: "test run",
|
||||||
// dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run",
|
||||||
// configPath: "/workspace/integration_tests/dockerfiles/config_test_run.json",
|
configPath: "/workspace/integration_tests/dockerfiles/config_test_run.json",
|
||||||
// context: "integration_tests/dockerfiles/",
|
context: "integration_tests/dockerfiles/",
|
||||||
// repo: "test-run",
|
repo: "test-run",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// description: "test run no files changed",
|
description: "test run no files changed",
|
||||||
// dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run_2",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_run_2",
|
||||||
// configPath: "/workspace/integration_tests/dockerfiles/config_test_run_2.json",
|
configPath: "/workspace/integration_tests/dockerfiles/config_test_run_2.json",
|
||||||
// context: "integration_tests/dockerfiles/",
|
context: "integration_tests/dockerfiles/",
|
||||||
// repo: "test-run-2",
|
repo: "test-run-2",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// description: "test copy",
|
description: "test copy",
|
||||||
// dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_copy",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_copy",
|
||||||
// configPath: "/workspace/integration_tests/dockerfiles/config_test_copy.json",
|
configPath: "/workspace/integration_tests/dockerfiles/config_test_copy.json",
|
||||||
// context: "/workspace/integration_tests/",
|
context: "/workspace/integration_tests/",
|
||||||
// repo: "test-copy",
|
repo: "test-copy",
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
description: "test workdir",
|
description: "test workdir",
|
||||||
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_workdir",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_workdir",
|
||||||
|
|
@ -73,13 +73,13 @@ var structureTests = []struct {
|
||||||
dockerBuildContext string
|
dockerBuildContext string
|
||||||
repo string
|
repo string
|
||||||
}{
|
}{
|
||||||
// {
|
{
|
||||||
// description: "test env",
|
description: "test env",
|
||||||
// dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_env",
|
dockerfilePath: "/workspace/integration_tests/dockerfiles/Dockerfile_test_env",
|
||||||
// repo: "test-env",
|
repo: "test-env",
|
||||||
// dockerBuildContext: "/workspace/integration_tests/dockerfiles/",
|
dockerBuildContext: "/workspace/integration_tests/dockerfiles/",
|
||||||
// structureTestYamlPath: "/workspace/integration_tests/dockerfiles/test_env.yaml",
|
structureTestYamlPath: "/workspace/integration_tests/dockerfiles/test_env.yaml",
|
||||||
// },
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type step struct {
|
type step struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue