mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
feat: Add config option to allow user to select the default image source location
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
@@ -25,7 +25,7 @@ func BenchmarkImagePackageCatalogers(b *testing.B) {
|
||||
for _, c := range cataloger.ImageCatalogers(cataloger.DefaultConfig()) {
|
||||
// in case of future alteration where state is persisted, assume no dependency is safe to reuse
|
||||
userInput := "docker-archive:" + tarPath
|
||||
sourceInput, err := source.ParseInput(userInput, "", false)
|
||||
sourceInput, err := source.ParseInput(userInput, "")
|
||||
require.NoError(b, err)
|
||||
theSource, cleanupSource, err := source.New(*sourceInput, nil, nil)
|
||||
b.Cleanup(cleanupSource)
|
||||
|
||||
@@ -16,7 +16,7 @@ func catalogFixtureImage(t *testing.T, fixtureImageName string, scope source.Sco
|
||||
imagetest.GetFixtureImage(t, "docker-archive", fixtureImageName)
|
||||
tarPath := imagetest.GetFixtureImageTarPath(t, fixtureImageName)
|
||||
userInput := "docker-archive:" + tarPath
|
||||
sourceInput, err := source.ParseInput(userInput, "", false)
|
||||
sourceInput, err := source.ParseInput(userInput, "")
|
||||
require.NoError(t, err)
|
||||
theSource, cleanupSource, err := source.New(*sourceInput, nil, nil)
|
||||
t.Cleanup(cleanupSource)
|
||||
@@ -52,7 +52,7 @@ func catalogFixtureImage(t *testing.T, fixtureImageName string, scope source.Sco
|
||||
|
||||
func catalogDirectory(t *testing.T, dir string) (sbom.SBOM, *source.Source) {
|
||||
userInput := "dir:" + dir
|
||||
sourceInput, err := source.ParseInput(userInput, "", false)
|
||||
sourceInput, err := source.ParseInput(userInput, "")
|
||||
require.NoError(t, err)
|
||||
theSource, cleanupSource, err := source.New(*sourceInput, nil, nil)
|
||||
t.Cleanup(cleanupSource)
|
||||
|
||||
Reference in New Issue
Block a user