Skip to content

Conversation

@saanikaguptamicrosoft
Copy link
Collaborator

@saanikaguptamicrosoft saanikaguptamicrosoft commented Jan 20, 2026

Adds comprehensive unit test coverage for the azure.ai.finetune extension and enables CI test execution.

CI/Pipeline
Add ci-test.ps1 to run unit tests with gotestsum for better output formatting
Enable test execution in pipeline (SkipTests: false)
Add workingDirectory to the "Run tests" step in build-azd-extension.yml

image

Test Coverage
464+ tests across all packages
All tests pass on Windows, Linux, and macOS
Tests are deterministic (not flaky) and use mocks for external dependencies

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive unit test coverage for the azure.ai.finetune extension. The tests cover models, utilities, services, providers, and command functionality with table-driven patterns and thorough edge case testing.

Changes:

  • Adds 16 new test files covering all major components of the azure.ai.finetune extension
  • Adds 13 testdata YAML files for parser validation testing
  • Fixes spacing alignment for a constant in environment.go (formatting only)

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/models/views_test.go Tests for view model transformations and formatting helpers
pkg/models/requests_test.go Tests for request structure validation
pkg/models/finetune_test.go Tests for fine-tuning job models, validation, and JSON marshaling
pkg/models/errors_test.go Tests for error handling and error code uniqueness
pkg/models/deployment_test.go Tests for deployment models and configurations
internal/utils/time_test.go Tests for time formatting and duration calculations
internal/utils/status_test.go Tests for job status symbols and terminal status detection
internal/utils/retry_test.go Tests for retry logic with various failure scenarios
internal/utils/parser_test.go Tests for YAML config parsing with valid and invalid inputs
internal/utils/output_test.go Tests for output formatting (table, JSON, YAML)
internal/utils/environment_test.go Tests for environment constant validation
internal/utils/common_test.go Tests for file path utilities
internal/services/finetune_service_test.go Tests for fine-tuning service with mock providers
internal/providers/azure/provider_test.go Tests for Azure provider validation
internal/cmd/init_test.go Tests for initialization command and resource ID parsing
internal/utils/environment.go Formatting fix: aligns EnvFinetuningTokenScope constant spacing
internal/utils/testdata/*.yaml Test fixture files for parser validation tests

@saanikaguptamicrosoft saanikaguptamicrosoft merged commit 042c074 into Azure:main Jan 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants