■ ■ ■ ■ ■ ■
syft/formats/internal/testutils/utils.go
| skipped 46 lines |
47 | 47 | | |
48 | 48 | | err := format.Encode(&buffer, sbom) |
49 | 49 | | assert.NoError(t, err) |
50 | | - | actual := redact(buffer.Bytes(), redactors...) |
| 50 | + | actual := buffer.Bytes() |
51 | 51 | | |
52 | 52 | | // replace the expected snapshot contents with the current encoder contents |
53 | 53 | | if updateSnapshot { |
54 | 54 | | testutils.UpdateGoldenFileContents(t, actual) |
55 | 55 | | } |
56 | 56 | | |
| 57 | + | actual = redact(actual, redactors...) |
57 | 58 | | expected := redact(testutils.GetGoldenFileContents(t), redactors...) |
58 | 59 | | |
59 | 60 | | if json { |
| skipped 11 lines |
71 | 72 | | |
72 | 73 | | err := format.Encode(&buffer, sbom) |
73 | 74 | | assert.NoError(t, err) |
74 | | - | actual := redact(buffer.Bytes(), redactors...) |
| 75 | + | actual := buffer.Bytes() |
75 | 76 | | |
76 | 77 | | // replace the expected snapshot contents with the current encoder contents |
77 | 78 | | if updateSnapshot { |
78 | 79 | | testutils.UpdateGoldenFileContents(t, actual) |
79 | 80 | | } |
80 | 81 | | |
| 82 | + | actual = redact(actual, redactors...) |
81 | 83 | | expected := redact(testutils.GetGoldenFileContents(t), redactors...) |
82 | 84 | | |
83 | 85 | | if json { |
| skipped 305 lines |