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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user