diff options
author | Fabio Kung <fabio.kung@gmail.com> | 2017-03-27 10:18:53 -0700 |
---|---|---|
committer | Fabio Kung <fabio.kung@gmail.com> | 2017-06-23 07:52:33 -0700 |
commit | edad52707c536116363031002e6633e3fec16af5 (patch) | |
tree | 1be5f746c516a099b8db6c44c700dc07868d4cef /daemon/daemon_unix_test.go | |
parent | f668af4475980e32c99503c4a513668c24ea2da6 (diff) | |
download | docker-edad52707c536116363031002e6633e3fec16af5.tar.gz |
save deep copies of Container in the replica store
Reuse existing structures and rely on json serialization to deep copy
Container objects.
Also consolidate all "save" operations on container.CheckpointTo, which
now both saves a serialized json to disk, and replicates state to the
ACID in-memory store.
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
Diffstat (limited to 'daemon/daemon_unix_test.go')
-rw-r--r-- | daemon/daemon_unix_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index a2847bfbee..eb19376845 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -274,6 +274,10 @@ func TestMigratePre17Volumes(t *testing.T) { } `) + viewDB, err := container.NewViewDB() + if err != nil { + t.Fatal(err) + } volStore, err := store.New(volumeRoot) if err != nil { t.Fatal(err) @@ -284,7 +288,12 @@ func TestMigratePre17Volumes(t *testing.T) { } volumedrivers.Register(drv, volume.DefaultDriverName) - daemon := &Daemon{root: rootDir, repository: containerRoot, volumes: volStore} + daemon := &Daemon{ + root: rootDir, + repository: containerRoot, + containersReplica: viewDB, + volumes: volStore, + } err = ioutil.WriteFile(filepath.Join(containerRoot, cid, "config.v2.json"), config, 600) if err != nil { t.Fatal(err) |