Open abrarshivani opened 7 years ago
Unit tests should be added for new vSphere functionalities/tasks/code. Usually the unit tests simply reside together with the code need to be tested. For example, https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/awsup/aws_utils.go has its corresponding tests at: https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/awsup/aws_utils_test.go
Similarly, vSphere's utility code at: https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/vsphere/vsphere_utils.go may have its tests vsphere_utils_test.go at the same folder.
Guideline for unit tests: (I am just borrowing from kubernetes' unit tests guide)
We may not need unit tests for every file at once. But we should have the unit tests for significant files first. Current vSphere packages and files: pkg/model/vspheremodel/ pkg/resources/delete_cluster_vsphere.go protokube/pkg/protokube/vsphere_volume.go upup/pkg/fi/cloudup/vsphere/ upup/pkg/fi/cloudup/vspheretasks/
@casualjim We need to put framework in place to easily add and run these unit tests.
This issue was moved to kubernetes/kops#2745
Add unit tests so that issues can be captured in
make ci