Skip to content

Commit

Permalink
encoding/openapi: fix updating golden files in tests
Browse files Browse the repository at this point in the history
When `CUE_UPDATE` is true, the test should not
fail when the test output differs, but it does currently.
This fixes that.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I8b304c17a9252f0e983aa623aeea3a1aca9d346d
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1205770
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
  • Loading branch information
rogpeppe committed Dec 14, 2024
1 parent 5fdf0c2 commit 6e34b9e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion encoding/openapi/decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func TestDecode(t *testing.T) {
out = bytes.TrimSpace(out)

if diff := cmp.Diff(b, out); diff != "" {
t.Error(diff)
if cuetest.UpdateGoldenFiles {
a.Files[outIndex].Data = b
b = txtar.Format(a)
Expand Down

0 comments on commit 6e34b9e

Please sign in to comment.