mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
21 lines
627 B
Go
21 lines
627 B
Go
package integration
|
|
|
|
import (
|
|
"github.com/anchore/stereoscope/pkg/imagetest"
|
|
"github.com/anchore/syft/syft"
|
|
"github.com/anchore/syft/syft/source"
|
|
"testing"
|
|
)
|
|
|
|
func TestJavaNoMainPackage(t *testing.T) { // Regression: https://github.com/anchore/syft/issues/252
|
|
fixtureImageName := "image-java-no-main-package"
|
|
_, cleanup := imagetest.GetFixtureImage(t, "docker-archive", fixtureImageName)
|
|
tarPath := imagetest.GetFixtureImageTarPath(t, fixtureImageName)
|
|
defer cleanup()
|
|
|
|
_, _, _, err := syft.Catalog("docker-archive:"+tarPath, source.SquashedScope)
|
|
if err != nil {
|
|
t.Fatalf("failed to catalog image: %+v", err)
|
|
}
|
|
}
|