Remove the concept of a root dir out of engine

This makes the engine more general purpose so that we can
use it and the job routing functionality for reexec'ing our binary
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Conflicts:
	integration/runtime_test.go
This commit is contained in:
Michael Crosby
2014-04-22 19:04:03 -07:00
parent 817494d009
commit 672edfe807
8 changed files with 38 additions and 100 deletions
+3 -4
View File
@@ -627,10 +627,9 @@ func TestRestore(t *testing.T) {
// Here are are simulating a docker restart - that is, reloading all containers
// from scratch
eng = newTestEngine(t, false, eng.Root())
daemon2 := mkDaemonFromEngine(eng, t)
if len(daemon2.List()) != 2 {
t.Errorf("Expected 2 container, %v found", len(daemon2.List()))
eng = newTestEngine(t, false, runtime.Config().Root)
if len(runtime2.List()) != 2 {
t.Errorf("Expected 2 container, %v found", len(runtime2.List()))
}
runningCount := 0
for _, c := range daemon2.List() {
+1 -1
View File
@@ -149,7 +149,7 @@ func TestRestartKillWait(t *testing.T) {
t.Fatal(err)
}
eng = newTestEngine(t, false, eng.Root())
eng = newTestEngine(t, false, runtime.Config().Root)
srv = mkServerFromEngine(eng, t)
job = srv.Eng.Job("containers")
+1 -1
View File
@@ -181,7 +181,7 @@ func newTestEngine(t utils.Fataler, autorestart bool, root string) *engine.Engin
root = dir
}
}
eng, err := engine.New(root)
eng, err := engine.New()
if err != nil {
t.Fatal(err)
}