ExpectedErr:fmt.Errorf("controller plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = some grpc error"),
},
{
Name:"handles error invalid capacity range",
CapacityRange:&CapacityRange{
RequiredBytes:1000,
LimitBytes:500,
},
ExpectedErr:errors.New("LimitBytes cannot be less than RequiredBytes"),
},
{
Name:"handles error invalid content source",
ContentSource:&VolumeContentSource{
SnapshotID:"snap-12345",
CloneID:"vol-12345",
},
ExpectedErr:errors.New(
"one of SnapshotID or CloneID must be set if ContentSource is set"),
},
{
Name:"handles success missing source and range",
Response:&csipbv1.CreateVolumeResponse{},
},
{
Name:"handles success with capacity range and source",
ExpectedErr:fmt.Errorf("controller plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = some grpc error"),
ExpectedErr:fmt.Errorf("controller plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = some grpc error"),