mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
a4f8a2494b
* Jobs return an integer status instead of a string * Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command" * Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
24 lines
394 B
Go
24 lines
394 B
Go
package engine
|
|
|
|
import (
|
|
"github.com/dotcloud/docker/utils"
|
|
"testing"
|
|
)
|
|
|
|
var globalTestID string
|
|
|
|
func newTestEngine(t *testing.T) *Engine {
|
|
tmp, err := utils.TestDirectory("")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
eng, err := New(tmp)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
return eng
|
|
}
|
|
|
|
func mkJob(t *testing.T, name string, args ...string) *Job {
|
|
return newTestEngine(t).Job(name, args...)
|
|
}
|