Skip to content

Conversation

@trangevi
Copy link
Member

@trangevi trangevi commented Dec 9, 2025

No description provided.

Copy link
Contributor

@JeffreyCA JeffreyCA left a comment

Choose a reason for hiding this comment

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

Do we want these tests to run in our pipelines? It doesn't look like they're hooked up currently:

Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity identity issues with no activity label Dec 16, 2025
Copilot AI review requested due to automatic review settings December 17, 2025 00:30
@microsoft-github-policy-service microsoft-github-policy-service bot removed the no-recent-activity identity issues with no activity label Dec 17, 2025
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 PR adds comprehensive integration tests for the Azure AI Agents extension, including test infrastructure, utilities, and two test suites covering agent initialization and deployment workflows. The changes also include a bug fix in the init command that properly extracts agent names from template structures.

Key Changes:

  • New test infrastructure with suite setup/teardown that provisions Azure resources for integration testing
  • Integration tests for agent initialization (init command) with various manifest sources and target directories
  • Integration tests for agent deployment (deploy command) with API validation
  • Bug fix in init.go to correctly extract agent names from ContainerAgent or PromptAgent templates
  • Updated dependencies to support integration testing (testify, vcr, Azure SDK packages)

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
cli/azd/extensions/azure.ai.agents/test/integrationTests/testUtilities/test_utils.go Utility functions for executing azd commands, parsing outputs, and logging test execution with verbose mode support
cli/azd/extensions/azure.ai.agents/test/integrationTests/testUtilities/test_suite.go Test suite setup/teardown infrastructure that provisions Azure resources using azd templates and manages test environment lifecycle
cli/azd/extensions/azure.ai.agents/test/integrationTests/initTests/init_test.go Integration tests verifying agent initialization with different manifest sources (GitHub URLs) and target directory configurations
cli/azd/extensions/azure.ai.agents/test/integrationTests/deployTests/deploy_test.go Integration tests for agent deployment with API validation including conversation creation and agent response verification
cli/azd/extensions/azure.ai.agents/internal/cmd/init.go Bug fix to extract agent name from template structures (ContainerAgent/PromptAgent) instead of using deprecated manifest.Name field, plus improved error handling
cli/azd/extensions/azure.ai.agents/go.mod Added testify for test assertions and updated Azure SDK dependencies for integration test support
cli/azd/extensions/azure.ai.agents/go.sum Corresponding checksum updates for new and updated dependencies

args := []string{
"init",
"-e", fmt.Sprintf("azd-extension-integration-tests-%s", suffix),
"--location", "northcentralus",
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

Hardcoded location 'northcentralus' should be replaced with a configurable value. The functional tests in cli/azd/test/functional/cli_test.go use environment variables (AZD_TEST_AZURE_LOCATION) or fallback to user config (defaults.location). Consider following this pattern for flexibility across different test environments.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +27
var (
// Verbose logging flag
verboseLogging bool
// Current test context for logging
currentTestName string
)
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

Using package-level global variables (verboseLogging and currentTestName) for state management is not thread-safe and may cause issues if tests run in parallel. Consider using context or test-specific state instead. The functional tests in cli/azd/test/functional/cli_test.go use a properly initialized config struct pattern that is thread-safe.

Copilot uses AI. Check for mistakes.
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity identity issues with no activity label Dec 24, 2025
@JeffreyCA JeffreyCA removed the no-recent-activity identity issues with no activity label Dec 29, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity identity issues with no activity label Jan 5, 2026
@trangevi
Copy link
Member Author

trangevi commented Jan 5, 2026

Still in progress

@microsoft-github-policy-service microsoft-github-policy-service bot removed the no-recent-activity identity issues with no activity label Jan 5, 2026
Copy link
Contributor

Copilot AI commented Jan 7, 2026

@trangevi I've opened a new pull request, #6469, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

4 participants