mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #4167 from shykes/fix-tests-mac
Fix or document broken tests on mac
This commit is contained in:
commit
19e44217f5
2 changed files with 15 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -64,6 +65,18 @@ func TestEngineRoot(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
// We expect Root to resolve to an absolute path.
|
||||
// FIXME: this should not be necessary.
|
||||
// Until the above FIXME is implemented, let's check for the
|
||||
// current behavior.
|
||||
tmp, err = filepath.EvalSymlinks(tmp)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tmp, err = filepath.Abs(tmp)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
dir := path.Join(tmp, "dir")
|
||||
eng, err := New(dir)
|
||||
if err != nil {
|
||||
|
|
|
@ -31,6 +31,8 @@ func mkTestTagStore(root string, t *testing.T) *TagStore {
|
|||
t.Fatal(err)
|
||||
}
|
||||
img := &Image{ID: testImageID}
|
||||
// FIXME: this fails on Darwin with:
|
||||
// tags_unit_test.go:36: mkdir /var/folders/7g/b3ydb5gx4t94ndr_cljffbt80000gq/T/docker-test569b-tRunner-075013689/vfs/dir/foo/etc/postgres: permission denied
|
||||
if err := graph.Register(nil, archive, img); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue