Skip to content

Centralize Verify convention #9371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2025
Merged

Centralize Verify convention #9371

merged 4 commits into from
May 17, 2025

Conversation

sebastienros
Copy link
Member

Found a way to centrally apply the HELIX contraints on Verify calls.

@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 23:54
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label May 16, 2025
Copy link
Contributor

@Copilot 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 centralizes the verification logic by replacing explicit calls to Verifier.Verify(...).UseHelixAwareDirectory(...) with a unified Verify(...) call that implicitly handles HELIX constraints.

  • Updated test methods across various Azure test files to align with the new central Verify convention.
  • Removed redundant chaining of UseHelixAwareDirectory to avoid duplication of HELIX directory logic.

Reviewed Changes

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

Show a summary per file
File Description
tests/Aspire.Hosting.Azure.Tests/AzureWebPubSubExtensionsTests.cs Removed explicit HELIX directory usage in Verify calls.
tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs Replaced Verifier.Verify with centralized Verify for identity tests.
tests/Aspire.Hosting.Azure.Tests/AzureStorageExtensionsTests.cs Updated Verify call by eliminating UseHelixAwareDirectory.
tests/Aspire.Hosting.Azure.Tests/AzureSqlExtensionsTests.cs Unified Verify method call across SQL test scenarios.
tests/Aspire.Hosting.Azure.Tests/AzureSignalRExtensionsTests.cs Removed HELIX-specific chaining from SignalR tests.
tests/Aspire.Hosting.Azure.Tests/AzureServiceBusExtensionsTests.cs Similar update with Verify call for ServiceBus tests.
tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs Transitioned to centralized Verify without HELIX directory usage.
tests/Aspire.Hosting.Azure.Tests/AzureResourceOptionsTests.cs Updated Verify call, removing explicit HELIX directory chaining.
tests/Aspire.Hosting.Azure.Tests/AzureRedisExtensionsTests.cs Consolidated Verify call to central Verify.
tests/Aspire.Hosting.Azure.Tests/AzureProvisioningResourceExtensionsTests.cs Standardized Verify call by removing UseHelixAwareDirectory.
tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs Adjusted Verify usage to the new centralized convention.
tests/Aspire.Hosting.Azure.Tests/AzureKeyVaultTests.cs Removed HELIX directory chaining in favor of central Verify logic.
tests/Aspire.Hosting.Azure.Tests/AzureFunctionsTests.cs Updated Verify calls in functions tests with the central method.
tests/Aspire.Hosting.Azure.Tests/AzureEventHubsExtensionsTests.cs Removed explicit HELIX directory usage in Verify chain.
tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceTests.cs Transitioned to centralized Verify without HELIX configuration.
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBExtensionsTests.cs Unified Verify usage by removing HELIX chaining.
tests/Aspire.Hosting.Azure.Tests/AzureContainerRegistryTests.cs Updated Verify call to align with the new convention.
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs Replaced multiple instances of UseHelixAwareDirectory with Verify.
tests/Aspire.Hosting.Azure.Tests/AzureBicepResourceTests.cs Replaced explicit HELIX directory calls with central Verify.
tests/Aspire.Hosting.Azure.Tests/AzureAppServiceTests.cs Updated Verify calls to remove direct HELIX directory specification.
Comments suppressed due to low confidence (1)

tests/Aspire.Hosting.Azure.Tests/AzureWebPubSubExtensionsTests.cs:61

  • Ensure that the new Verify method centrally applies the HELIX directory logic previously provided by UseHelixAwareDirectory, so that snapshot output remains in the intended location.
await Verifier.Verify(manifest.BicepText, extension: "bicep")

@@ -33,8 +33,8 @@ public async Task AddAzureUserAssignedIdentity_GeneratesExpectedResourcesAndBice

var (_, bicep) = await GetManifestWithBicep(resource);

await Verifier.Verify(bicep, extension: "bicep")
.UseHelixAwareDirectory();
await Verify(bicep, extension: "bicep");
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

Consider adding a documentation comment in the Verify method definition to clarify that it now implicitly handles the HELIX constraints, removing the need for an explicit UseHelixAwareDirectory call.

Copilot uses AI. Check for mistakes.

@sebastienros sebastienros requested a review from RussKie May 17, 2025 02:36
@davidfowl
Copy link
Member

Nice! Merge these so we have one module initializer

https://github.com/dotnet/aspire/blob/main/tests/Shared/TestModuleInitializer.cs

@sebastienros sebastienros merged commit 1f1ea89 into main May 17, 2025
500 of 502 checks passed
@sebastienros sebastienros deleted the sebros/centralverify branch May 17, 2025 20:07
@davidfowl
Copy link
Member

Watch the main build

@sebastienros
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants