mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Move relative workdir build test to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
@ -476,6 +476,26 @@ func TestBuildUser(t *testing.T) {
|
||||
logDone("build - user")
|
||||
}
|
||||
|
||||
func TestBuildRelativeWorkdir(t *testing.T) {
|
||||
checkSimpleBuild(t,
|
||||
`
|
||||
FROM busybox
|
||||
RUN [ "$PWD" = '/' ]
|
||||
WORKDIR test1
|
||||
RUN [ "$PWD" = '/test1' ]
|
||||
WORKDIR /test2
|
||||
RUN [ "$PWD" = '/test2' ]
|
||||
WORKDIR test3
|
||||
RUN [ "$PWD" = '/test2/test3' ]
|
||||
`,
|
||||
"testbuildimg",
|
||||
"{{json .config.WorkingDir}}",
|
||||
`"/test2/test3"`)
|
||||
|
||||
deleteImages("testbuildimg")
|
||||
logDone("build - relative workdir")
|
||||
}
|
||||
|
||||
// TODO: TestCaching
|
||||
|
||||
// TODO: TestADDCacheInvalidation
|
||||
|
Reference in New Issue
Block a user