-
Notifications
You must be signed in to change notification settings - Fork 665
leverage Verify.SystemJson to support verify for JsonNode #9663
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
base: main
Are you sure you want to change the base?
leverage Verify.SystemJson to support verify for JsonNode #9663
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.
Pull Request Overview
This PR introduces support for verifying JsonNode instances by leveraging the new Verify.SystemJson package and updating test verification calls. Key changes include:
- Adding VerifierSettings.UseStrictJson() and VerifierSettings.InitializePlugins() during test initialization.
- Updating project files to include the Verify.SystemJson package.
- Replacing calls to Verify(manifest.ToString(), "json") with Verify(manifest) in tests.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.
File | Description |
---|---|
tests/Shared/TestModuleInitializer.cs | Added configuration calls for strict JSON and plugin initialization. |
tests/Directory.Packages.props | Added Verify.SystemJson package reference. |
tests/Aspire.Hosting.Kubernetes.Tests/*.csproj | Added package references for Verify.SystemJson. |
tests/Aspire.Hosting.Azure.Tests/*.cs | Updated verification calls to pass JsonNode directly. |
can someone unlock the Verify.SystemJson nuget usage |
I've kicked off the package mirror. When it is done I will re-kick this PR. |
Looks like this is causing
|
…temJson-to-support-verify-for-JsonNode
it is the other way around would you like to keep if u r ok with |
actually. i will put this in draft for now. let me have think on it |
@eerhardt i look into this the building of that portion of the string is done by AzureSqlServerResource
the reason this So in
the writer has no encoder config so we get Test showing the behavior
to get a non-unicode escaped quote we would need to use an Encoder
The reason verified file change from so IMO having the verified file change from I am not sure how u want to proceed here. I would prefer manifests are written to disk with the more readable The value of this is, aside from less code, that Verify.SystemJson supports the larger feature set of Verify. I am not sure of the encoding qwerk is a problem (that dilutes that value) or not? thoughts? |
I'm fine with the |
Description
JsonNode
instances toVerify()
VerifierSettings.UseStrictJson();
https://github.com/VerifyTests/Verify/blob/main/docs/serializer-settings.md#not-valid-json . this seems to be the preference for the code base? let me know if it isntVerifierSettings.InitializePlugins
. this enables any plugins for Verify, in this case onlyVerify.SystemJson
Checklist
<remarks />
and<code />
elements on your triple slash comments?doc-idea
templatebreaking-change
templatediagnostic
template