mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
cephfs: adds unit testing for unfencing procedure
Signed-off-by: Riya Singhal <rsinghal@redhat.com>
This commit is contained in:
parent
14b06837d0
commit
74dfb7b913
@ -42,3 +42,19 @@ func TestFenceClusterNetwork(t *testing.T) {
|
|||||||
_, err := controller.FenceClusterNetwork(context.TODO(), req)
|
_, err := controller.FenceClusterNetwork(context.TODO(), req)
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestUnfenceClusterNetwork is a minimal test for the UnfenceClusterNetwork()
|
||||||
|
// procedure. During unit-testing, there is no Ceph cluster available, so actual
|
||||||
|
// operations can not be performed.
|
||||||
|
func TestUnfenceClusterNetwork(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
controller := NewFenceControllerServer()
|
||||||
|
|
||||||
|
req := &fence.UnfenceClusterNetworkRequest{
|
||||||
|
Parameters: map[string]string{},
|
||||||
|
Secrets: nil,
|
||||||
|
Cidrs: nil,
|
||||||
|
}
|
||||||
|
_, err := controller.UnfenceClusterNetwork(context.TODO(), req)
|
||||||
|
assert.Error(t, err)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user