Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Test that ensures legacy dashboard token env var is honored - #9296

#9296
Merged
DamianEdwards merged 1 commit into
mainmicrosoft/aspire:mainfrom
damianedwards/test-legacy-dashboard-env-varsmicrosoft/aspire:damianedwards/test-legacy-dashboard-env-varsCopy head branch name to clipboard
May 14, 2025
Merged

Test that ensures legacy dashboard token env var is honored#9296
DamianEdwards merged 1 commit into
mainmicrosoft/aspire:mainfrom
damianedwards/test-legacy-dashboard-env-varsmicrosoft/aspire:damianedwards/test-legacy-dashboard-env-varsCopy head branch name to clipboard

Conversation

@DamianEdwards

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
@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

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.