kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
296 stars 179 forks source link

Unit test for VM vol patch w opt. merge #2938

Closed akutz closed 2 months ago

akutz commented 3 months ago

What this PR does / why we need it:

This patch adds a unit test to validate the behavior of the WCP guest controller that attaches volumes to VM Operator VMs using a patch with an optimistic merge. This patch is a follow-up to #2925 and proves that the change in that PR does correctly send updated volumes in the patch.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes NA

Testing done:

$ go test -count 1 -v -run TestVirtualMachineVolumePatchWithOptimisticMerge ./pkg/csi/service/wcpguest
=== RUN   TestVirtualMachineVolumePatchWithOptimisticMerge
--- PASS: TestVirtualMachineVolumePatchWithOptimisticMerge (0.00s)
PASS
ok      sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/wcpguest  0.608s

Special notes for your reviewer:

Release note:

NONE
xing-yang commented 3 months ago

/approve

k8s-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akutz, divyenpatel, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [divyenpatel,xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
divyenpatel commented 2 months ago

/ok-to-test