mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
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:
co-authored by
anchore-oss-update-bot
parent
d179724f42
commit
4393654d03
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user