IBM / ibm-object-csi-driver

Object storage plugin for IBM satellite
Apache License 2.0
3 stars 8 forks source link

code structuring for controller server UTs #108

Closed ashimagarg27 closed 5 months ago

ashimagarg27 commented 5 months ago

Describe your changes

Issue ticket number and link

Checklist before requesting a review

ashimagarg27 commented 5 months ago

Test Results

~ ❯ oc get secret | grep csi                                                                                                                                                              ⎈ ashima-sat-cluster/ckr3g71d0h6v7s72bb5g/admin 10:36:42
cos-s3-csi-pvc-rclone      cos-s3-csi-driver                     6      39s
cos-s3-csi-pvc-s3fs        cos-s3-csi-driver                     6      84s

~ ❯ oc get pvc                                                                                                                                                                            ⎈ ashima-sat-cluster/ckr3g71d0h6v7s72bb5g/admin 10:36:58
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                          AGE
cos-s3-csi-pvc-rclone   Bound    pvc-11565e5a-af56-4668-afb2-8af62d53a8d4   256Mi      RWO            ibm-object-csi-cos-s3-csi-rclone-sc   30s
cos-s3-csi-pvc-s3fs     Bound    pvc-19528285-25a4-430b-8ebd-4b30bbbd8ceb   256Mi      RWO            ibm-object-csi-cos-s3-csi-s3fs-sc     8s

~ ❯ oc get pv                                                                                                                                                                             ⎈ ashima-sat-cluster/ckr3g71d0h6v7s72bb5g/admin 10:37:53
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                           STORAGECLASS                          REASON   AGE
pvc-11565e5a-af56-4668-afb2-8af62d53a8d4   256Mi      RWO            Retain           Bound    default/cos-s3-csi-pvc-rclone   ibm-object-csi-cos-s3-csi-rclone-sc            33s
pvc-19528285-25a4-430b-8ebd-4b30bbbd8ceb   256Mi      RWO            Retain           Bound    default/cos-s3-csi-pvc-s3fs     ibm-object-csi-cos-s3-csi-s3fs-sc              11s

~ ❯ oc get pod                                                                                                                                                                            ⎈ ashima-sat-cluster/ckr3g71d0h6v7s72bb5g/admin 10:37:56
NAME          READY   STATUS    RESTARTS   AGE
cos-csi-app   1/1     Running   0          10s

❯ oc exec -it cos-csi-app -- /bin/bash                                                                                                                                  ⎈ ashima-sat-cluster/ckr3g71d0h6v7s72bb5g/admin 10:41:25
root@cos-csi-app:/# mount | grep s3
s3fs on /data1 type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
root@cos-csi-app:/# mount | grep rclone
ibmcos:ashima-bucket02 on /data2 type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
root@cos-csi-app:/#
root@cos-csi-app:/# ls /data1
Medibuddy_2024.pdf  new.txt  test.txt
root@cos-csi-app:/# ls /data2
Medibuddy_2024.pdf  new.txt  test.txt
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# cat /data1/test.txt
test
root@cos-csi-app:/# cat /data2/test.txt
test
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# echo "new test val" > /data1/test.txt
root@cos-csi-app:/# cat /data1/test.txt
new test val
root@cos-csi-app:/#
root@cos-csi-app:/# echo "rclone mounting" > /data2/test.txt
root@cos-csi-app:/# cat /data2/test.txt
rclone mounting
root@cos-csi-app:/# exit
exit