cephfs admin: add test case for new RemoveSubVolumWithFlags function

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-11-30 15:58:51 -05:00 committed by mergify[bot]
parent e958f299ec
commit 8fc7765cfe
1 changed files with 15 additions and 0 deletions

View File

@ -141,6 +141,21 @@ func TestRemoveSubVolume(t *testing.T) {
t.Run("force", func(t *testing.T) { t.Run("force", func(t *testing.T) {
removeTest(t, fsa.ForceRemoveSubVolume) removeTest(t, fsa.ForceRemoveSubVolume)
}) })
t.Run("withFlagsEmpty", func(t *testing.T) {
removeTest(t, func(v, g, n string) error {
return fsa.RemoveSubVolumeWithFlags(v, g, n, SubVolRmFlags{})
})
})
t.Run("withFlagsForce", func(t *testing.T) {
removeTest(t, func(v, g, n string) error {
return fsa.RemoveSubVolumeWithFlags(v, g, n, SubVolRmFlags{Force: true})
})
})
t.Run("withFlagsRetainSnaps", func(t *testing.T) {
removeTest(t, func(v, g, n string) error {
return fsa.RemoveSubVolumeWithFlags(v, g, n, SubVolRmFlags{RetainSnapshots: true})
})
})
} }
func TestResizeSubVolume(t *testing.T) { func TestResizeSubVolume(t *testing.T) {