Skip to content

Commit 24b0cc4

Browse files
committed
Moved the files to linked-clone
1 parent 970ec95 commit 24b0cc4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

tests/e2e/helpers/linked_clone_concurrent_helper.go renamed to tests/e2e/linked_clone/linked_clone_concurrent_util.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
package helpers
14+
package linked_clone
1515

1616
import (
1717
"context"
@@ -29,6 +29,7 @@ import (
2929
)
3030

3131
// This function can be used to create given number of PVC/pod
32+
// Keeping this method here as it populates the array used for cleanup
3233
func CreateMultiplePvcPod(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, namespace string, storageclass *v1.StorageClass, doCreatePod bool, doCreateDep bool, numOfPVc int) map[*corev1.PersistentVolumeClaim][]*corev1.PersistentVolume {
3334

3435
volumeMap := map[*corev1.PersistentVolumeClaim][]*corev1.PersistentVolume{}
@@ -50,6 +51,7 @@ func CreateMultiplePvcPod(ctx context.Context, e2eTestConfig *config.E2eTestConf
5051
}
5152

5253
// This method can be used to create snapshot in parallel
54+
// Keeping this method here as it populates the array used for cleanup
5355
func CreateSnapshotInParallel(ctx context.Context, e2eTestConfig *config.E2eTestConfig, namespace string, volumeMap map[*corev1.PersistentVolumeClaim][]*corev1.PersistentVolume) chan *snapV1.VolumeSnapshot {
5456

5557
var wg sync.WaitGroup

tests/e2e/helpers/linked_clone_helper.go renamed to tests/e2e/linked_clone/linked_clone_util.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
package helpers
14+
package linked_clone
1515

1616
import (
1717
"context"
@@ -56,6 +56,7 @@ var lcToDelete []*corev1.PersistentVolumeClaim
5656
/*
5757
This method will create PVC, attach pod to it and creates snapshot
5858
*/
59+
// Keeping this method here as it populates the array used for cleanup
5960
func CreatePvcPodAndSnapshot(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, namespace string, storageclass *v1.StorageClass, doCreatePod bool, doCreateDep bool) (*corev1.PersistentVolumeClaim, []*corev1.PersistentVolume, *snapV1.VolumeSnapshot) {
6061

6162
fmt.Println("Create PVC and verify PVC is bound")
@@ -75,6 +76,7 @@ func CreatePvcPodAndSnapshot(ctx context.Context, e2eTestConfig *config.E2eTestC
7576
}
7677

7778
// Create stand alone or deployment pod as per given arg
79+
// Keeping this method here as it populates the array used for cleanup
7880
func CreatePodForPvc(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, namespace string, pvclaim []*corev1.PersistentVolumeClaim, deCreatePod bool, doCreateDep bool) (*corev1.Pod, *appsv1.Deployment) {
7981
ginkgo.By("Create Pod to attach to Pvc")
8082
var pod *corev1.Pod
@@ -98,6 +100,7 @@ func CreatePodForPvc(ctx context.Context, e2eTestConfig *config.E2eTestConfig, c
98100
/*
99101
Create volume snapshot
100102
*/
103+
// Keeping this method here as it populates the array used for cleanup
101104
func CreateVolumeSnapshot(ctx context.Context, e2eTestConfig *config.E2eTestConfig, namespace string, pvclaim *corev1.PersistentVolumeClaim, pv []*corev1.PersistentVolume, diskSize string) (*snapV1.VolumeSnapshot, *snapV1.VolumeSnapshotContent) {
102105
// Create or get volume snapshot class
103106
ginkgo.By("Get or create volume snapshot class")
@@ -238,7 +241,7 @@ func PvcSpecWithLinkedCloneAnnotation(namespace string, storageclass *storagev1.
238241
/*
239242
Verify linked volume lists in list volume
240243
*/
241-
func ValidateLcInListVolume(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, pvc *corev1.PersistentVolumeClaim, namespace string) {
244+
func ValidateLinkedCloneInListVolume(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, pvc *corev1.PersistentVolumeClaim, namespace string) {
242245
ginkgo.By("Validate ListVolume Response for all the volumes")
243246
var logMessage string
244247
var sshClientConfig *ssh.ClientConfig
@@ -346,7 +349,7 @@ func ParseMi(value string) (int, error) {
346349
}
347350

348351
// This method can be used to create statefulset with linked clone annotation
349-
func CreateAndValidateLcWithSts(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, namespace string, sc *v1.StorageClass, snapName string, snapshotapigroup string) {
352+
func CreateAndValidateLinkedCloneWithSts(ctx context.Context, e2eTestConfig *config.E2eTestConfig, client clientset.Interface, namespace string, sc *v1.StorageClass, snapName string, snapshotapigroup string) {
350353
statefulset := k8testutil.GetStatefulSetFromManifest(e2eTestConfig.TestInput, namespace)
351354
ginkgo.By("Creating statefulset")
352355
annotations := map[string]string{

0 commit comments

Comments
 (0)