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...)
|
|
}
|