2013-10-23 04:35:26 -04:00
|
|
|
package engine
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/dotcloud/docker/utils"
|
2013-11-07 15:19:24 -05:00
|
|
|
"testing"
|
2013-10-23 04:35:26 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
var globalTestID string
|
|
|
|
|
2013-10-27 02:57:29 -04:00
|
|
|
func newTestEngine(t *testing.T) *Engine {
|
2013-11-20 02:37:03 -05:00
|
|
|
tmp, err := utils.TestDirectory("")
|
2013-10-23 04:35:26 -04:00
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2013-11-20 02:37:03 -05:00
|
|
|
eng, err := New(tmp)
|
2013-10-23 04: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 02:57:29 -04:00
|
|
|
return newTestEngine(t).Job(name, args...)
|
2013-10-23 04:35:26 -04:00
|
|
|
}
|