# README
Integration Test
Volume-event-exporter makes use of ginkgo & gomega libraries to implement its integration tests.
To run the integrations test:
- Copy kubeconfig file into path ~/.kube/config or set the KUBECONFIG env.
- Run
make sanity-test
Note:
- Integration test will spin up RPC server and will tear down server at end of the test. By default server will run on 9090 port and it can configured with option
--port
. - To run a specific test following command can be used:
In aboveginkgo -v -focus="TEST NFS PVC CREATE & DELETE EVENTS" -- -address=172.18.0.1 -port=9091
-focus
can have test name
Following parameters can be configured as a arguments to test:
- kubeconfig: Path to kubeconfig to interact with Kubernetes APIServer.
- address: Address on which server will start(Defaults to system IPAddress).
- port: Server port on which requests are served
- type: Defines the type of the RPC server, as of now only RESTfull server is supported.
Available Integration Tests:
Test Name | Expected behavior | Test Link |
---|---|---|
Create NFS PVC with reclaim policy Delete |
| nfs_sanity_test.go |
Delete NFS PVC with reclaim policy Delete |
| nfs_sanity_test.go |
Create NFS PVC with ReclaimPolicy Retain |
| nfs_pvc_retain_test.go |
Delete NFS PVC with ReclaimPolicy Retain |
| nfs_pvc_retain_test.go |
Delete released NFS PV |
| nfs_pvc_retain_test.go |
Create NFS PVC with invalid backend SC |
| nfs_pvc_invalid_backend_sc_test.go |
Delete NFS PVC with invalid backend SC |
| nfs_pvc_invalid_backend_sc_test.go |
Disable sidecar and create PVC with reclaim policy Delete. Once the NFS PVC is bounded start sidecar |
| nfs_pvc_creation_scaling_down_sidecar_test.go |
Stop the volume-event-exporter sidecar and Create NFS PVC with ReclaimPolicy Retain. Once NFS PVC is bound, start the volume-event-exporter sidecar |
nfs_pv | nfs_create_retain_pv_disable_exporter_test.go |
Disable sidecar then provision & de-provision NFS PVC with reclaim policy Delete. Once the NFS PVC is deleted start sidecar |
| nfs_pvc_create_delete_disabling_sidecar_test.go |
Stop the volume-event-exporter sidecar and Create NFS PVC with ReclaimPolicy Retain. Delete NFS PVC. Start the volume-event-exporter sidecar |
nfs_pv
| nfs_delete_retain_pv_disable_exporter_test.go |
Stop the volume-events-exporter sidecar and delete the released NFS PV. Start the volume-events-exporter sidecar |
nfs_pv | nfs_delete_released_pv_disable_exporter_test.go |