docker/engine/helpers_test.go

25 строки
394 B
Go
Исходник Обычный вид История

2013-10-23 12:35:26 +04:00
package engine
import (
"github.com/dotcloud/docker/utils"
2013-11-08 00:19:24 +04:00
"testing"
2013-10-23 12:35:26 +04:00
)
var globalTestID string
func newTestEngine(t *testing.T) *Engine {
tmp, err := utils.TestDirectory("")
2013-10-23 12:35:26 +04:00
if err != nil {
t.Fatal(err)
}
eng, err := New(tmp)
2013-10-23 12:35:26 +04:00
if err != nil {
t.Fatal(err)
}
return eng
}
func mkJob(t *testing.T, name string, args ...string) *Job {
return newTestEngine(t).Job(name, args...)
2013-10-23 12:35:26 +04:00
}