1
0
mirror of https://github.com/moby/moby.git synced 2025-12-09 10:01:25 +03:00

Rewrite TestBuildWithInaccessibleFilesInContext to not use fixtures

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
This commit is contained in:
Alexandr Morozov
2014-09-24 16:42:17 +04:00
parent 52cf331206
commit 51a56399f6
11 changed files with 52 additions and 54 deletions

View File

@@ -440,6 +440,9 @@ func fakeContext(dockerfile string, files map[string]string) (*FakeContext, erro
if err != nil {
return nil, err
}
if err := os.Chmod(tmp, 0755); err != nil {
return nil, err
}
ctx := &FakeContext{tmp}
for file, content := range files {
if err := ctx.Add(file, content); err != nil {