1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix a nil dereference in buildfile_test.go

The test runtime object wasn't properly initialized.
This commit is contained in:
Louis Opter 2013-06-27 17:52:47 -07:00
parent 1a201d2433
commit aa8ea84d11

View file

@ -2,6 +2,7 @@ package docker
import (
"io/ioutil"
"sync"
"testing"
)
@ -92,7 +93,12 @@ func TestBuild(t *testing.T) {
}
defer nuke(runtime)
srv := &Server{runtime: runtime}
srv := &Server{
runtime: runtime,
lock: &sync.Mutex{},
pullingPool: make(map[string]struct{}),
pushingPool: make(map[string]struct{}),
}
buildfile := NewBuildFile(srv, ioutil.Discard)
if _, err := buildfile.Build(mkTestContext(ctx.dockerfile, ctx.files, t)); err != nil {