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
1 changed files with 7 additions and 1 deletions

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 {