Skip to content

Add unit tests for Plan.IsWarm() method #3041

@coderabbitai

Description

@coderabbitai

Description

Add comprehensive unit tests for the Plan.IsWarm() method introduced in PR #3007.

Context

The IsWarm() method centralizes warm migration detection logic that was previously inline across multiple files. It checks both the legacy Spec.Warm flag and the new Spec.Type == MigrationWarm field.

Testing Requirements

Unit tests should cover:

  • Spec.Warm = true returns true
  • Spec.Type = MigrationWarm returns true
  • Both fields set returns true
  • Neither field set returns false
  • Other migration types return false

References

Location

pkg/apis/forklift/v1beta1/plan.go (lines 284-286)

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