-
Notifications
You must be signed in to change notification settings - Fork 729
Convert tests to snapshot-based tests #8930
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
Conversation
|
How many merge conflicts with existing PRs is this going to cause? Seems like a big notification that we’re changing how we’re going to be doing snapshotting would be required before merging something this significant and disruptive |
I can't see any reasons why it should cause conflicts... And if there's a conflict it should be simple to solve. |
You can continue to do it the old way, if you desire so. It just that way is painful, laborious and hard to maintain. |
|
I don’t have any desire to use the old way, but if you make a change this big to how we do baseline testing, there should be a discussion with the engineering team. I think the this is a positive change but not one you PR when it affects everyone’s workflow. There should be a show and tell |
|
1- What does this do? Is it just to tell that static AzureContainerAppsTests()
{
FileExtensions.AddTextExtension("bicep");
}2- Is there a place in the tests projects that it could be put so it doesn't have to be repeated? I didn't see anything that would break existing PRs, unless the ones touching these bicep results. |
|
My suggestion is change this PR into a minimal one (just changing exactly one test to show the pattern) then get consensus in the chat you started. Then if we want to go ahead, it would be best to do it in chunks to minimize merge conflicts/make review feasible.. |
This allows us to have verified files as ".bicep" instead of ".txt". Whilst this isn't strictly speaking necessary, it makes the IDEs to render files with colours.
I don't know tbh. There's no guarantee all tests will be run, so this needs to be done at the assembly-level... Maybe
The verified files can be placed in custom subfolders, if necessary.
|
| using Aspire.Hosting.Utils; | ||
| using Microsoft.Extensions.Configuration; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Xunit; |
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.
This is something that existing PRs will need to update, though easy to do, since the build verifies there isn't any unnecessary using statements. Couldn't find where this implicit one is coming from though.
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.
Me either, probably somewhere from Verifier or its dependencies.
|
So... is there anything blocking this? |
Follow up on #8930 - update to selected tests.
This reverts commit f971998.
Convert selected tests to the snapshot-based testing to simplify the tests and simplify and improve the test experience - whenever a test fails you won't need to guess where, you'll see it in a diff tool of your choice.

E.g.: