Skip to content

feat: Pester test coverage for all conversion scripts #8

@kristopherjturner

Description

@kristopherjturner

Overview

Implement Pester test coverage for all scripts in the toolkit. Tests should mock Hyper-V and Azure Arc cmdlets to enable execution in CI environments without real cluster access.

Scope

  • Pester v5 test suites for all scripts in scripts/azurelocal/ and scripts/hyperv/
  • Mock implementations of Hyper-V cmdlets (Get-VM, Set-VM, Stop-VM, etc.)
  • Mock implementations of Azure Arc cmdlets (Get-AzConnectedMachine, etc.)
  • Test cases: happy path, pre-flight failure, mid-conversion failure, rollback trigger
  • Code coverage reporting (target: ≥80% function coverage)
  • CI integration: tests run on every PR

Acceptance Criteria

  • All scripts have Pester test suites in tests/
  • Tests run in CI without real Hyper-V or Arc environment
  • ≥80% function coverage across all scripts
  • Pre-flight failure and rollback scenarios have explicit test cases
  • Coverage report generated as a CI artifact

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions