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
|
|
|
|
|
2013-10-27 10:57:29 +04:00
|
|
|
func newTestEngine(t *testing.T) *Engine {
|
2013-11-20 11:37:03 +04:00
|
|
|
tmp, err := utils.TestDirectory("")
|
2013-10-23 12:35:26 +04:00
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2013-11-20 11:37:03 +04:00
|
|
|
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 {
|
2013-10-27 10:57:29 +04:00
|
|
|
return newTestEngine(t).Job(name, args...)
|
2013-10-23 12:35:26 +04:00
|
|
|
}
|