Skip to content

Add unit test verifying dockerfile aligns with current target framework #19445

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AndyButland
Copy link
Contributor

@AndyButland AndyButland commented May 28, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

Description

Added a unit test that checks the Dockerfile details for the .NET version matches with the current target framework, as a check that updating this doesn't get forgotten with each major release.

Unit test runs as expected locally, from the build from this PR I can verify that it does the same on the pipeline.

Testing

Visual inspection will suffice.

@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 14:15
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 a new unit test to ensure the Dockerfile’s ASP.NET runtime and SDK versions stay in sync with the project’s current target framework.

  • Introduces DockerFileTests verifying that the Dockerfile FROM lines match the assembly’s target framework version.
  • Implements helpers to read the .NET version from both the executing assembly and the Dockerfile.

@AndyButland AndyButland changed the title Add unit test verifying dockerfile aligns with current target framework. Add unit test verifying dockerfile aligns with current target framework May 28, 2025
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.

1 participant