mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
chore: update test redactor ordering (#1765)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
parent
fd02bef0a3
commit
451cb9d5ca
1 changed files with 4 additions and 2 deletions
|
@ -47,13 +47,14 @@ func AssertEncoderAgainstGoldenImageSnapshot(t *testing.T, format sbom.Format, s
|
|||
|
||||
err := format.Encode(&buffer, sbom)
|
||||
assert.NoError(t, err)
|
||||
actual := redact(buffer.Bytes(), redactors...)
|
||||
actual := buffer.Bytes()
|
||||
|
||||
// replace the expected snapshot contents with the current encoder contents
|
||||
if updateSnapshot {
|
||||
testutils.UpdateGoldenFileContents(t, actual)
|
||||
}
|
||||
|
||||
actual = redact(actual, redactors...)
|
||||
expected := redact(testutils.GetGoldenFileContents(t), redactors...)
|
||||
|
||||
if json {
|
||||
|
@ -71,13 +72,14 @@ func AssertEncoderAgainstGoldenSnapshot(t *testing.T, format sbom.Format, sbom s
|
|||
|
||||
err := format.Encode(&buffer, sbom)
|
||||
assert.NoError(t, err)
|
||||
actual := redact(buffer.Bytes(), redactors...)
|
||||
actual := buffer.Bytes()
|
||||
|
||||
// replace the expected snapshot contents with the current encoder contents
|
||||
if updateSnapshot {
|
||||
testutils.UpdateGoldenFileContents(t, actual)
|
||||
}
|
||||
|
||||
actual = redact(actual, redactors...)
|
||||
expected := redact(testutils.GetGoldenFileContents(t), redactors...)
|
||||
|
||||
if json {
|
||||
|
|
Loading…
Reference in a new issue