Persist container state to disk

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-02-11 16:45:23 -08:00
parent 31327166e5
commit 5c246d038f
17 changed files with 211 additions and 197 deletions

View File

@@ -82,14 +82,12 @@ func TestFactoryLoadContainer(t *testing.T) {
}
expectedState = &State{
InitProcessPid: 1024,
Config: *expectedConfig,
}
)
if err := os.Mkdir(filepath.Join(root, id), 0700); err != nil {
t.Fatal(err)
}
if err := marshal(filepath.Join(root, id, configFilename), expectedConfig); err != nil {
t.Fatal(err)
}
if err := marshal(filepath.Join(root, id, stateFilename), expectedState); err != nil {
t.Fatal(err)
}