From f29b9bfbcdf2567565c8d780e5f17db02731e0fd Mon Sep 17 00:00:00 2001 From: fengzixu Date: Thu, 18 Jun 2020 08:33:51 +0900 Subject: [PATCH] remove redundant error volume condition --- mock/service/node.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mock/service/node.go b/mock/service/node.go index f6a79ad7..39d1928e 100644 --- a/mock/service/node.go +++ b/mock/service/node.go @@ -411,15 +411,11 @@ func (s *service) NodeGetVolumeStats(ctx context.Context, } if len(req.GetVolumeId()) == 0 { - resp.VolumeCondition.Abnormal = true - resp.VolumeCondition.Message = "Volume ID cannot be empty" - return resp, status.Error(codes.InvalidArgument, "Volume ID cannot be empty") + return nil, status.Error(codes.InvalidArgument, "Volume ID cannot be empty") } if len(req.GetVolumePath()) == 0 { - resp.VolumeCondition.Abnormal = true - resp.VolumeCondition.Message = "Volume path cannot be empty" - return resp, status.Error(codes.InvalidArgument, "Volume Path cannot be empty") + return nil, status.Error(codes.InvalidArgument, "Volume Path cannot be empty") } i, v := s.findVolNoLock("id", req.VolumeId)