mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
chore: update test redactor ordering (#1765)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user