Rewrite TestBuildWithInaccessibleFilesInContext to not use fixtures

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 51a56399f6384decee03a7e1aa56a3f46cb7c63f
Component: engine
This commit is contained in:
Alexandr Morozov
2014-09-24 16:42:17 +04:00
parent beff003be9
commit ba92a9eabd
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 {