Fix or document broken tests on mac
@@ -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)
dir := path.Join(tmp, "dir")
eng, err := New(dir)
if err != nil {
@@ -31,6 +31,8 @@ func mkTestTagStore(root string, t *testing.T) *TagStore {
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 {