From b0640dcd85229545c2f949b625a649c402396d5b Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:22:05 -0500 Subject: [PATCH] chore: add instructions for updating golden files (#728) * chore: add instructions for updating golden files --- .../howto-guide-generated-code-maintenance.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/contributor/howto-guide-generated-code-maintenance.md b/doc/contributor/howto-guide-generated-code-maintenance.md index ce6ddd62d..ae994c977 100644 --- a/doc/contributor/howto-guide-generated-code-maintenance.md +++ b/doc/contributor/howto-guide-generated-code-maintenance.md @@ -66,6 +66,19 @@ go -C generator/ run ./cmd/sidekick refreshall -project-root .. && cargo fmt Then run the unit tests and send a PR with whatever changed. +## Update golden files + +The golden files live under `generator/testdata`. + +Run: + +```bash +go -C generator test ./... +``` + +After updating the golden files, make sure to run `git diff generator/testdata` +to verify the changes before committing them. + ## The Glorious Future Someday `sidekick` will be stable enough that (a) it will not be part of the