-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
test-unit-update-golden
target to update golden files ๐
Errors should be ignored when running this ๐ผ Signed-off-by: Vincent Demeester <[email protected]>
- Loading branch information
1 parent
dffc628
commit cd7c83e
Showing
2 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# This will run `go test a/package -test.update-golden=true` on all packages that are importing `gotest.tools/v3/golden` | ||
# This will update the golden files with the current output. | ||
# Run this only when you are sure the output is meant to change. | ||
go test $(go list -f '{{ .ImportPath }} {{ .TestImports }}' ./... | grep gotest.tools/v3/golden | awk '{print $1}' | tr '\n' ' ') -test.update-golden=true |