Fix a nil dereference in buildfile_test.go

The test runtime object wasn't properly initialized.
Upstream-commit: aa8ea84d11ccac8f68fa1b0337633dd7d49a44fe
Component: engine
This commit is contained in:
Louis Opter
2013-06-27 17:52:47 -07:00
parent 2afee8496c
commit 09791158d7

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 {