mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
tests: verify MultipleFileContentsByRef gets contents from the right path
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
@@ -113,7 +113,13 @@ func TestDirectoryResolver_MultipleFileContentsByRef(t *testing.T) {
|
||||
resolver := DirectoryResolver{"test-fixtures"}
|
||||
|
||||
for _, p := range c.input {
|
||||
refs = append(refs, file.NewFileReference(p))
|
||||
newRefs, err := resolver.FilesByPath(p)
|
||||
if err != nil {
|
||||
t.Errorf("could not generate refs: %+v", err)
|
||||
}
|
||||
for _, ref := range newRefs {
|
||||
refs = append(refs, ref)
|
||||
}
|
||||
}
|
||||
|
||||
contents, err := resolver.MultipleFileContentsByRef(refs...)
|
||||
|
||||
Reference in New Issue
Block a user