Skip to content

Conversation

DamianEdwards
Copy link
Member

Description

Updates a test to ensure the dashboard honors the legacy environment variable for the dashboard token.

Fixes #8487

@DamianEdwards DamianEdwards requested review from JamesNK and Copilot May 13, 2025 23:55
@DamianEdwards DamianEdwards requested a review from mitchdenny as a code owner May 13, 2025 23:55
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label May 13, 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

Adds legacy environment variable coverage for the dashboard token in an existing test, ensuring backward compatibility.

  • Converts a single-case test ([Fact]) into a parameterized one ([Theory]) to run with both current and legacy token env var names
  • Adds InlineData for KnownConfigNames.Legacy.DashboardFrontendBrowserToken
  • Updates the test logic to use the tokenEnvVarName parameter instead of a hardcoded config name
Comments suppressed due to low confidence (1)

tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs:653

  • [nitpick] Consider renaming the test method to reflect that it now covers both current and legacy token env vars, e.g., StartAsync_DashboardAuthConfig_HonorsCurrentAndLegacyTokenEnvVars.
[Theory]

@DamianEdwards DamianEdwards merged commit a8c8aba into main May 14, 2025
177 checks passed
@DamianEdwards DamianEdwards deleted the damianedwards/test-legacy-dashboard-env-vars branch May 14, 2025 00:16
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test to ensure legacy env var for dashboard token is honored
2 participants