mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: implement NodeReclaimSpace
By calling fstrim/blkdiscard on the volume, space consumption should get reduced. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
7d36c5a9d1
commit
c274649b80
@ -41,3 +41,22 @@ func TestControllerReclaimSpace(t *testing.T) {
|
||||
_, err := controller.ControllerReclaimSpace(context.TODO(), req)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
// TestNodeReclaimSpace is a minimal test for the NodeReclaimSpace() procedure.
|
||||
// During unit-testing, there is no Ceph cluster available, so actual
|
||||
// operations can not be performed.
|
||||
func TestNodeReclaimSpace(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
node := NewReclaimSpaceNodeServer()
|
||||
|
||||
req := &rs.NodeReclaimSpaceRequest{
|
||||
VolumeId: "",
|
||||
VolumePath: "",
|
||||
VolumeCapability: nil,
|
||||
Secrets: nil,
|
||||
}
|
||||
|
||||
_, err := node.NodeReclaimSpace(context.TODO(), req)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user