IBM / ibm-object-csi-driver

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

NodeServer Unit Tests #118

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

Coverage

Screenshot 2024-05-20 at 7 43 45 PM
ashimagarg27 commented 5 months ago

Functionality Tests

Last login: Tue May 21 08:21:31 on ttys005
~ ❯ oc get secret | grep csi                                                                                                                                                                        ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:22:02
cos-s3-csi-pvc-rclone      cos-s3-csi-driver                     6      7d14h
cos-s3-csi-pvc-s3fs        cos-s3-csi-driver                     6      7d13h

~ ❯ oc get pods -n kube-system | grep csi                                                                                                                                                           ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:22:05
cos-s3-csi-controller-bc8667cb7-s2vt7            3/3     Running   0          74s
cos-s3-csi-driver-4nmxq                          3/3     Running   0          73s
cos-s3-csi-driver-jdj86                          3/3     Running   0          73s
cos-s3-csi-driver-lfcw4                          3/3     Running   0          73s

~ ❯ oc get sc                                                                                                                                                                                       ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:22:16
NAME                   PROVISIONER         RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
cos-s3-csi-rclone-sc   cos.s3.csi.ibm.io   Retain          Immediate           false                  3m16s
cos-s3-csi-s3fs-sc     cos.s3.csi.ibm.io   Retain          Immediate           false                  3m16s
cos-s3-csi-sc          cos.s3.csi.ibm.io   Delete          Immediate           false                  3m15s

~ ❯ oc get pvc                                                                                                                                                                                      ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:24:10
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS           AGE
cos-s3-csi-pvc-rclone   Bound    pvc-a7b05da1-8aa7-4a63-8bc7-a1c5168b59a6   256Mi      RWO            cos-s3-csi-rclone-sc   13s
cos-s3-csi-pvc-s3fs     Bound    pvc-204bc639-4d84-43b5-a1fc-8c0005c78d43   256Mi      RWO            cos-s3-csi-s3fs-sc     42s

~ ❯ oc get pv                                                                                                                                                                                       ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:24:15
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                           STORAGECLASS           REASON   AGE
pvc-204bc639-4d84-43b5-a1fc-8c0005c78d43   256Mi      RWO            Retain           Bound    default/cos-s3-csi-pvc-s3fs     cos-s3-csi-s3fs-sc              45s
pvc-a7b05da1-8aa7-4a63-8bc7-a1c5168b59a6   256Mi      RWO            Retain           Bound    default/cos-s3-csi-pvc-rclone   cos-s3-csi-rclone-sc            15s

~ ❯ oc get pod                                                                                                                                                                                      ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:24:18
NAME          READY   STATUS    RESTARTS   AGE
cos-csi-app   1/1     Running   0          9s

~ ❯ oc exec -it cos-csi-app -- /bin/bash                                                                                                                                                            ⎈ ashima-sat/cp0u7tkd0gdarrvi9cbg/admin 08:24:37
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:/#
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:/# cat /data1/new.txt
check
root@cos-csi-app:/# echo "s3fs mounting" > /data1/new.txt
root@cos-csi-app:/# cat /data1/new.txt
s3fs mounting
root@cos-csi-app:/#
root@cos-csi-app:/#
root@cos-csi-app:/# cat /data2/new.txt
s3fs mounting
root@cos-csi-app:/# echo "rclone mounting" > /data2/new.txt
root@cos-csi-app:/# cat /data2/new.txt
rclone mounting
root@cos-csi-app:/# exit
exit