1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

integ-cli: use httpserver container for fakeGIT

This change enables `fakeGIT()` to use the new `fakeStorage`
server which is automatically starting a container on the remote test
daemon machine using the git repo directory (when requested).

Fixes the following tests:

- `TestBuildApiLowerDockerfile`
- `TestBuildApiBuildGitWithF`
- `TestBuildApiDoubleDockerfile` (skipped on windows: NTFS case-insensitive)
- `TestBuildFromGIT` (still needs local server)

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan
2015-03-09 20:53:28 -07:00
parent 7c4951d552
commit 44ffb199d0
3 changed files with 90 additions and 46 deletions

View File

@ -382,7 +382,7 @@ func TestBuildApiLowerDockerfile(t *testing.T) {
git, err := fakeGIT("repo", map[string]string{
"dockerfile": `FROM busybox
RUN echo from dockerfile`,
})
}, false)
if err != nil {
t.Fatal(err)
}
@ -407,7 +407,7 @@ func TestBuildApiBuildGitWithF(t *testing.T) {
RUN echo from baz`,
"Dockerfile": `FROM busybox
RUN echo from Dockerfile`,
})
}, false)
if err != nil {
t.Fatal(err)
}
@ -428,12 +428,13 @@ RUN echo from Dockerfile`,
}
func TestBuildApiDoubleDockerfile(t *testing.T) {
testRequires(t, UnixCli) // dockerfile overwrites Dockerfile on Windows
git, err := fakeGIT("repo", map[string]string{
"Dockerfile": `FROM busybox
RUN echo from Dockerfile`,
"dockerfile": `FROM busybox
RUN echo from dockerfile`,
})
}, false)
if err != nil {
t.Fatal(err)
}