Add regression test for server.signingWorker being fully optional - #2321
Open
ayushsingh82 wants to merge 1 commit into
Open
Add regression test for server.signingWorker being fully optional#2321ayushsingh82 wants to merge 1 commit into
ayushsingh82 wants to merge 1 commit into
Conversation
server.signingWorker (wallet-gateway/remote/src/config/Config.ts) is
already wrapped in z.preprocess((val) => val ?? {}, ...) with
pollInterval defaulting to 5000, so the whole block can already be
omitted from config.yaml/json. That behavior had no direct test
coverage, so add one.
Note: this repo has no helm chart, so the "propagate to the helm
chart" part of canton-network#2176 doesn't apply here -- it likely refers to a
different/deployment repo.
Fixes canton-network#2176
Signed-off-by: ayushsingh82 <ayushsinghmi711@gmail.com>
Contributor
Author
|
@rukmini-basu-da whenever you have a chance, would appreciate a look at this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server.signingWorker(wallet-gateway/remote/src/config/Config.ts) is already wrapped inz.preprocess((val) => val ?? {}, ...), withpollIntervaldefaulting to5000. That already makes the wholesigningWorkerblock optional, with a sane default, exactly as #2176 asks for at the config-schema level -- it just had no direct test coverage, so a regression here would be easy to miss. This PR adds that coverage.I could not find a helm chart in this repo (
grep -rn signingWorker -- *.yaml *.ymlturns up nothing), so the "propagate to the helm chart" part of the issue doesn't apply here -- it most likely refers to a different/deployment repo, or the chart has since moved/been removed. Flagging this in case a maintainer wants to redirect that part of the issue elsewhere or close it as already resolved.Fixes #2176
Test plan
z.preprocess(val => val ?? {}, z.object({ pollInterval: z.number().int().positive().default(5000) }))parsed against{}in this repo's actual zod version) produce{ pollInterval: 5000 }, matching the new test's assertionvitestsuite locally in a fresh worktree -- a sibling package (core-token-standard) requires Daml-generated codegen artifacts not available outside the full dev environment; unrelated to this change