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:
parent
1a201d2433
commit
aa8ea84d11
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue