-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Attempt to Fix and Re-enable HasIncludedFiles Test #47220
Attempt to Fix and Re-enable HasIncludedFiles Test #47220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR aims to fix and re-enable the HasIncludedFiles test by updating test execution parameters and correcting expected file paths in the zip output.
- Re-enabled the previously skipped HasIncludedFiles test.
- Updated the execution command to explicitly use the Debug configuration.
- Revised assertions to match updated file paths in the generated output package.
Reviewed Changes
File | Description |
---|---|
test/TestAssets/TestProjects/EndToEndTestApp/Program.cs | Added a basic console program as a test asset. |
test/dotnet-pack.Tests/PackTests.cs | Re-enabled the test and updated execution parameters and zip entry assertions. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
test/dotnet-pack.Tests/PackTests.cs:91
- Confirm that using the '-c Debug' configuration is intentional and consistent with other tests, so that it does not cause unexpected behavior in the pack process.
.Execute("-c", "Debug")
test/dotnet-pack.Tests/PackTests.cs:102
- Double-check that the updated expected file paths ('newpath/pack1.txt' and 'anotherpath/pack2.txt') correctly reflect the intended output from the pack process.
.Should().Contain(e => e.FullName == "newpath/pack1.txt")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
public void HasIncludedFiles() | ||
{ | ||
var testInstance = _testAssetsManager.CopyTestAsset("EndToEndTestApp") | ||
.WithSource(); | ||
|
||
new DotnetPackCommand(Log) | ||
.WithWorkingDirectory(testInstance.Path) | ||
.Execute() | ||
.Execute("-c", "Debug") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the -c Debug part necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, it appears to be the release path. Therefore, the debug configuration was used to ensure the correct file path.
No description provided.