Open
Conversation
Split the monolithic vmprovider_vm_test.go into smaller files grouped
by behavior (create, delete, power, network, crypto, disks, policy,
snapshots, zones, web console, and many others).
Rename production and test helpers for consistency:
vmprovider_vm_utils{,_test}.go -> vmprovider_utils{,_test}.go,
vmprovider_vm_group.go -> vmprovider_vmgroup.go,
vmprovider_vm_snapshot.go -> vmprovider_vmsnapshot.go.
Update vsphere_suite_test.go and vmprovider_test.go to wire the new
layout. Fold former vmprovider_vm2_test.go network/E2E coverage into
vmprovider_vm_network_test.go.
a559314 to
46d2b75
Compare
Minimum allowed line rate is |
bryanv
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do, and why is it needed?
This change refactors the vSphere VM provider test suite by breaking up the very large
vmprovider_vm_test.gointo many smaller, topic-focused_test.gofiles. Shared helpers and a few non-test sources were renamed so names align with their role. Supporting scripts and test labels were added so the split layout is easier to maintain.A single multi-thousand-line test file was hard to navigate, review, and extend. Grouping tests by domain (lifecycle, networking, storage, crypto, PCI, snapshots, etc.) makes failures and ownership clearer and matches how the provider is structured conceptually.
Changes include:
vmprovider_vm_create_test.go,vmprovider_vm_delete_test.go,vmprovider_vm_power_test.go,vmprovider_vm_network_test.go(including priorvmprovider_vm2_test.gonetwork/E2E scenarios),vmprovider_vm_crypto_test.go,vmprovider_vm_configspec_test.go,vmprovider_vm_snapshot_test.go(with companionvmprovider_vmsnapshot_test.go),vmprovider_vmgroup_test.go,vmprovider_vm_vks_test.go,vmprovider_sync_vmi_test.go,vmprovider_update_creds_test.go, and many other focused modules.vmprovider_vm_utils.go→vmprovider_utils.go(and tests),vmprovider_vm_group.go→vmprovider_vmgroup.go,vmprovider_vm_snapshot.go→vmprovider_vmsnapshot.go.split_vmprovider_vm_tests.py,flatten_vm_cud_cou.py, andembed_standalone_vm_tests.pyunderpkg/providers/vsphere/tools/.vsphere_suite_test.goandvmprovider_test.goupdated for the new structure;test_labels.goextended for labels used by the refactor.This change may be validated with:
Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes
NAAre there any special notes for your reviewer:
Depends on #1527 and will be rebased once #1527 is merged.
Please add a release note if necessary: