vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Fix UI Plugin failing tests #583

Closed adambarreiro closed 1 year ago

adambarreiro commented 1 year ago

This PR complements #575 as it fixes a failing unit test.

The reason of the failure is that the unit test was referencing a variable defined in a regular test, which is not visible when using the unit tag.

I have refactored the code so the variable doesn't need to be global anymore.

I've also added the unit step to the GitHub Action, to run the unit tests in PRs with make testunit, so we minimize the chances of this happening again.