Skip to content

Commit

Permalink
Merge pull request #227 from avalluri/fix-mock-driver
Browse files Browse the repository at this point in the history
Fix mock driver
  • Loading branch information
k8s-ci-robot authored Oct 14, 2019
2 parents 4e55894 + 717446f commit 82a10f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mock/service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *service) CreateVolume(
case *csi.VolumeContentSource_Volume:
vid := req.GetVolumeContentSource().GetVolume().GetVolumeId()
// Check if the source volume exists.
if volID, _ := s.findVolNoLock("id", vid); volID > 0 {
if volID, _ := s.findVolNoLock("id", vid); volID >= 0 {
v = s.newVolumeFromVolume(req.Name, capacity, volID)
} else {
return nil, status.Errorf(codes.NotFound, "Requested source volume %s not found", vid)
Expand Down

0 comments on commit 82a10f4

Please sign in to comment.