client: rename rootfs to snapshot in "With" functions

Clarify terminology around functions which use and create
snapshots for containers.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-07-25 14:36:30 -07:00
parent 9434bf9e8a
commit 73bec3edea
12 changed files with 51 additions and 51 deletions

View File

@@ -33,12 +33,12 @@ func TestCheckpointRestore(t *testing.T) {
t.Error(err)
return
}
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewRootFS(id, image))
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image))
if err != nil {
t.Error(err)
return
}
defer container.Delete(ctx, WithRootFSDeletion)
defer container.Delete(ctx, WithSnapshotCleanup)
task, err := container.NewTask(ctx, empty())
if err != nil {
@@ -123,12 +123,12 @@ func TestCheckpointRestoreNewContainer(t *testing.T) {
t.Error(err)
return
}
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewRootFS(id, image))
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image))
if err != nil {
t.Error(err)
return
}
defer container.Delete(ctx, WithRootFSDeletion)
defer container.Delete(ctx, WithSnapshotCleanup)
task, err := container.NewTask(ctx, empty())
if err != nil {
@@ -163,7 +163,7 @@ func TestCheckpointRestoreNewContainer(t *testing.T) {
t.Error(err)
return
}
if err := container.Delete(ctx, WithRootFSDeletion); err != nil {
if err := container.Delete(ctx, WithSnapshotCleanup); err != nil {
t.Error(err)
return
}
@@ -226,12 +226,12 @@ func TestCheckpointLeaveRunning(t *testing.T) {
t.Error(err)
return
}
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewRootFS(id, image))
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image))
if err != nil {
t.Error(err)
return
}
defer container.Delete(ctx, WithRootFSDeletion)
defer container.Delete(ctx, WithSnapshotCleanup)
task, err := container.NewTask(ctx, empty())
if err != nil {