mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
Keep original FileInfo persisted on file.Metadata structs (#1794)
* pull in fileinfo changes from stereoscope #172 Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix CLI test assumption about the docker daemon Signed-off-by: Alex Goodman <alex.goodman@anchore.com> --------- Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Signed-off-by: <>
This commit is contained in:
@@ -52,6 +52,13 @@ func TestAllFormatsConvertable(t *testing.T) {
|
||||
convertArgs = append(convertArgs, "--template", test.template)
|
||||
}
|
||||
cmd, stdout, stderr = runSyft(t, test.env, convertArgs...)
|
||||
if cmd.ProcessState.ExitCode() != 0 {
|
||||
t.Log("STDOUT:\n", stdout)
|
||||
t.Log("STDERR:\n", stderr)
|
||||
t.Log("COMMAND:", strings.Join(cmd.Args, " "))
|
||||
t.Fatalf("failure executing syft creating an sbom")
|
||||
return
|
||||
}
|
||||
for _, traitFn := range assertions {
|
||||
traitFn(t, stdout, stderr, cmd.ProcessState.ExitCode())
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ import (
|
||||
)
|
||||
|
||||
func TestSpdxValidationTooling(t *testing.T) {
|
||||
img := imagetest.GetFixtureImage(t, "docker-archive", "image-java-spdx-tools")
|
||||
require.NotEmpty(t, img.Metadata.Tags)
|
||||
imgTag := img.Metadata.Tags[0]
|
||||
// note: the external tooling requires that the daemon explicitly has the image loaded, not just that
|
||||
// we can get the image from a cache tar.
|
||||
imgTag := imagetest.LoadFixtureImageIntoDocker(t, "image-java-spdx-tools")
|
||||
|
||||
images := []string{
|
||||
"alpine:3.17.3@sha256:b6ca290b6b4cdcca5b3db3ffa338ee0285c11744b4a6abaa9627746ee3291d8d",
|
||||
|
||||
Reference in New Issue
Block a user