mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rbd: adapt to GetVolumeByID error message
GetVolumeByID already returning detailed error message, the caller just need to return it. No need to add duplicate details to error message. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
7e2e5ba2e5
commit
8788e5ec08
@ -27,6 +27,7 @@ import (
|
||||
|
||||
corerbd "github.com/ceph/ceph-csi/internal/rbd"
|
||||
"github.com/ceph/ceph-csi/internal/rbd/types"
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
|
||||
librbd "github.com/ceph/go-ceph/rbd"
|
||||
"github.com/ceph/go-ceph/rbd/admin"
|
||||
@ -594,6 +595,16 @@ func TestGetGRPCError(t *testing.T) {
|
||||
err: nil,
|
||||
expectedErr: status.Error(codes.OK, "ok string"),
|
||||
},
|
||||
{
|
||||
name: "ErrImageNotFound",
|
||||
err: corerbd.ErrImageNotFound,
|
||||
expectedErr: status.Error(codes.NotFound, corerbd.ErrImageNotFound.Error()),
|
||||
},
|
||||
{
|
||||
name: "ErrPoolNotFound",
|
||||
err: util.ErrPoolNotFound,
|
||||
expectedErr: status.Error(codes.NotFound, util.ErrPoolNotFound.Error()),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
Reference in New Issue
Block a user