// Calls AddNode() once. // Verifies node exists, and zero volumes to attach. func Test_AddNode_Positive_NewNode(t *testing.T) { … } // Calls AddNode() once. // Verifies node exists. // Calls AddNode() again with the same node. // Verifies node exists, and zero volumes to attach. func Test_AddNode_Positive_ExistingNode(t *testing.T) { … } // Populates data struct with a single node no volume. // Calls AddPod() with the same node and new pod/volume. // Verifies node/volume exists, and 1 volumes to attach. func Test_AddPod_Positive_NewPodNodeExistsVolumeDoesntExist(t *testing.T) { … } // Populates data struct with a single node no volume. // Calls AddPod() with the same node and new pod/volume. // Verifies node/volume exists. // Calls AddPod() with the same node and volume different pod. // Verifies the same node/volume exists, and 1 volumes to attach. func Test_AddPod_Positive_NewPodNodeExistsVolumeExists(t *testing.T) { … } // Populates data struct with a single node no volume. // Calls AddPod() with the same node and new pod/volume. // Verifies node/volume exists. // Calls AddPod() with the same node, volume, and pod. // Verifies the same node/volume exists, and 1 volumes to attach. func Test_AddPod_Positive_PodExistsNodeExistsVolumeExists(t *testing.T) { … } // Calls AddPod() with new pod/volume/node on empty data struct. // Verifies call fails because node does not exist. func Test_AddPod_Negative_NewPodNodeDoesntExistVolumeDoesntExist(t *testing.T) { … } // Populates data struct with a single node. // Calls DeleteNode() to delete the node. // Verifies node no longer exists, and zero volumes to attach. func Test_DeleteNode_Positive_NodeExists(t *testing.T) { … } // Calls DeleteNode() to delete node on empty data struct. // Verifies no error is returned, and zero volumes to attach. func Test_DeleteNode_Positive_NodeDoesntExist(t *testing.T) { … } // Populates data struct with new pod/volume/node. // Calls DeleteNode() to delete the node. // Verifies call fails because node still contains child volumes. func Test_DeleteNode_Negative_NodeExistsHasChildVolumes(t *testing.T) { … } // Populates data struct with new pod/volume/node. // Calls DeleteNode() to delete the pod/volume/node. // Verifies volume no longer exists, and zero volumes to attach. func Test_DeletePod_Positive_PodExistsNodeExistsVolumeExists(t *testing.T) { … } // Populates data struct with pod1/volume/node and pod2/volume/node. // Calls DeleteNode() to delete the pod1/volume/node. // Verifies volume still exists, and one volumes to attach. func Test_DeletePod_Positive_2PodsExistNodeExistsVolumesExist(t *testing.T) { … } // Populates data struct with pod1/volume/node. // Calls DeleteNode() to delete the pod2/volume/node. // Verifies volume still exists, and one volumes to attach. func Test_DeletePod_Positive_PodDoesNotExist(t *testing.T) { … } // Populates data struct with pod/volume/node1. // Calls DeleteNode() to delete the pod/volume/node2. // Verifies volume still exists, and one volumes to attach. func Test_DeletePod_Positive_NodeDoesNotExist(t *testing.T) { … } // Populates data struct with pod/volume1/node. // Calls DeleteNode() to delete the pod/volume2/node. // Verifies volume still exists, and one volumes to attach. func Test_DeletePod_Positive_VolumeDoesNotExist(t *testing.T) { … } // Calls NodeExists() on random node. // Verifies node does not exist, and no volumes to attach. func Test_NodeExists_Positive_NodeExists(t *testing.T) { … } // Populates data struct with a single node. // Calls NodeExists() on that node. // Verifies node exists, and no volumes to attach. func Test_NodeExists_Positive_NodeDoesntExist(t *testing.T) { … } // Populates data struct with new pod/volume/node. // Calls VolumeExists() on that volume/node. // Verifies volume/node exists, and one volume to attach. func Test_VolumeExists_Positive_VolumeExistsNodeExists(t *testing.T) { … } // Populates data struct with new pod/volume1/node. // Calls VolumeExists() on that volume2/node. // Verifies volume2/node does not exist, and one volume to attach. func Test_VolumeExists_Positive_VolumeDoesntExistNodeExists(t *testing.T) { … } // Calls VolumeExists() on some volume/node. // Verifies volume/node do not exist, and zero volumes to attach. func Test_VolumeExists_Positive_VolumeDoesntExistNodeDoesntExists(t *testing.T) { … } // Calls GetVolumesToAttach() // Verifies zero volumes to attach. func Test_GetVolumesToAttach_Positive_NoNodes(t *testing.T) { … } // Populates data struct with two nodes. // Calls GetVolumesToAttach() // Verifies zero volumes to attach. func Test_GetVolumesToAttach_Positive_TwoNodes(t *testing.T) { … } // Populates data struct with two nodes with one volume/pod each. // Calls GetVolumesToAttach() // Verifies two volumes to attach. func Test_GetVolumesToAttach_Positive_TwoNodesOneVolumeEach(t *testing.T) { … } // Populates data struct with two nodes with one volume/pod each and an extra // pod for the second node/volume pair. // Calls GetVolumesToAttach() // Verifies two volumes to attach. func Test_GetVolumesToAttach_Positive_TwoNodesOneVolumeEachExtraPod(t *testing.T) { … } // Populates data struct with two nodes with one volume/pod on one node and two // volume/pod pairs on the other node. // Calls GetVolumesToAttach() // Verifies three volumes to attach. func Test_GetVolumesToAttach_Positive_TwoNodesThreeVolumes(t *testing.T) { … } func verifyVolumeToAttach( t *testing.T, volumesToAttach []VolumeToAttach, expectedNodeName k8stypes.NodeName, expectedVolumeName v1.UniqueVolumeName, expectedVolumeSpecName string) { … } func Test_GetPodsOnNodes(t *testing.T) { … }