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

@@ -28,7 +28,7 @@ func BenchmarkContainerCreate(b *testing.B) {
var containers []Container
defer func() {
for _, c := range containers {
if err := c.Delete(ctx, WithRootFSDeletion); err != nil {
if err := c.Delete(ctx, WithSnapshotCleanup); err != nil {
b.Error(err)
}
}
@@ -38,7 +38,7 @@ func BenchmarkContainerCreate(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
id := fmt.Sprintf("%s-%d", b.Name(), i)
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 {
b.Error(err)
return
@@ -71,7 +71,7 @@ func BenchmarkContainerStart(b *testing.B) {
var containers []Container
defer func() {
for _, c := range containers {
if err := c.Delete(ctx, WithRootFSDeletion); err != nil {
if err := c.Delete(ctx, WithSnapshotCleanup); err != nil {
b.Error(err)
}
}
@@ -79,7 +79,7 @@ func BenchmarkContainerStart(b *testing.B) {
for i := 0; i < b.N; i++ {
id := fmt.Sprintf("%s-%d", b.Name(), i)
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 {
b.Error(err)
return