Skip to content

Commit a1fb96f

Browse files
committed
Fix volume options and error code in CNTR-1 test
1 parent 19de356 commit a1fb96f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

feature/container/containerz/tests/container_lifecycle/containerz_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,12 @@ func TestVolumes(t *testing.T) {
490490
}
491491
// Allow time for removal to settle.
492492
time.Sleep(5 * time.Second)
493-
494-
mountOpts := map[string]string{
493+
volOpts := map[string]string{
494+
"type": "none",
495495
"options": "bind",
496-
"mountpoint": "/some-path",
496+
"mountpoint": "/tmp",
497497
}
498-
499-
createdVolumeName, err := cli.CreateVolume(ctx, volumeName, "local", nil, mountOpts)
498+
createdVolumeName, err := cli.CreateVolume(ctx, volumeName, "local", nil, volOpts)
500499
if err != nil {
501500
t.Fatalf("CreateVolume(%q, \"local\", nil, nil) failed: %v", volumeName, err)
502501
}
@@ -857,7 +856,7 @@ func TestPlugins(t *testing.T) {
857856
} else {
858857
t.Logf("Got expected error when starting with non-existent image %q: %v", pluginName, err)
859858
s, ok := status.FromError(err)
860-
if !ok || (s.Code() != codes.Unknown && s.Code() != codes.FailedPrecondition) {
859+
if !ok || (s.Code() != codes.Unknown && s.Code() != codes.NotFound) {
861860
t.Errorf("Expected gRPC status code Unknown or NotFound for non-existent image, got: %v (status code: %s)", err, s.Code())
862861
}
863862
}

0 commit comments

Comments
 (0)