Skip to content

Refactor all copyoffload tests to use create_storagemap_and_networkmap() helper #255

@coderabbitai

Description

@coderabbitai

Context

All copyoffload tests currently use manual map creation with get_network_migration_map() and get_storage_migration_map() instead of the standard create_storagemap_and_networkmap() helper function.

Per the coding guideline, all tests in **/tests/test_*migration.py should follow the standard two-step pattern:

  1. Create storage/network migration maps via create_storagemap_and_networkmap()
  2. Execute migration via migrate_vms()

Scope

Refactor all existing copyoffload tests in tests/test_copyoffload_migration.py to use the standard helper function. This may require extending create_storagemap_and_networkmap() to accept copy-offload specific parameters such as:

  • offload_plugin_config
  • datastore_id
  • secondary_datastore_id (for multi-datastore tests)
  • Other copy-offload related parameters

Affected Tests

  • test_copyoffload_thin_migration
  • test_copyoffload_thin_snapshots_migration
  • test_copyoffload_thick_lazy_migration
  • test_copyoffload_multi_disk_migration
  • test_copyoffload_multi_disk_different_path_migration
  • test_copyoffload_rdm_virtual_disk_migration
  • test_copyoffload_multi_datastore_migration
  • test_copyoffload_independent_persistent_disk_migration
  • test_copyoffload_warm_migration

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions