Skip to content

Add unit tests for virt-v2v conversion helper functions #4513

@coderabbitai

Description

@coderabbitai

Description

Unit tests are needed for the new helper functions introduced in PR #4509 for separating virt-v2v conversion and inspection extra arguments.

Missing Test Coverage

The following functions in pkg/virt-v2v/conversion/conversion.go lack unit tests:

  • addConversionExtraArgs
  • addInspectorExtraArgs
  • addVirtV2vVsphereArgsForInspection

Context

These functions were introduced to separate extra arguments for conversion (VIRT_V2V_EXTRA_ARGS) from inspection (VIRT_V2V_INSPECTOR_EXTRA_ARGS), ensuring that conversion-specific args (e.g., --parallel) are not incorrectly passed to the inspector.

Unit tests should verify:

  1. Extra args are correctly applied when non-nil
  2. No args are added when nil
  3. The separation between conversion and inspection paths is maintained

References

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