Chore fix sync bump (#4809)

* chore(deps): update anchore dependencies

Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>

* chore: update test to account for sync wrapping panic

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
This commit is contained in:
Will Murphy
2026-04-22 08:48:30 -04:00
committed by GitHub
co-authored by anchore-oss-update-bot
parent d179724f42
commit 4393654d03
3 changed files with 60 additions and 63 deletions
+6 -3
View File
@@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/anchore/go-sync"
"github.com/anchore/syft/internal/unknown"
"github.com/anchore/syft/syft/artifact"
"github.com/anchore/syft/syft/file"
@@ -187,9 +188,11 @@ func TestClosesFileOnParserPanic(t *testing.T) {
upstreamCataloger: "unit-test-cataloger",
}
assert.PanicsWithValue(t, "panic!", func() {
_, _, _ = c.Catalog(ctx, resolver)
})
_, _, err := c.Catalog(ctx, resolver)
require.Error(t, err)
var panicErr sync.PanicError
require.ErrorAs(t, err, &panicErr)
assert.Equal(t, "panic!", panicErr.Value)
require.True(t, spy.closed)
}