update the json schema and tests with file contents section

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2021-04-12 17:33:20 -04:00
parent c1551a03c5
commit d451a5ad30
5 changed files with 90 additions and 938 deletions
@@ -25,7 +25,7 @@ func parser(_ string, reader io.Reader) ([]pkg.Package, error) {
func TestGenericCataloger(t *testing.T) {
globParsers := map[string]ParserFn{
"**a-path.txt": parser,
"**/a-path.txt": parser,
}
pathParsers := map[string]ParserFn{
"test-fixtures/another-path.txt": parser,
@@ -51,7 +51,7 @@ func TestGenericCataloger(t *testing.T) {
}
if len(actualPkgs) != len(expectedPkgs) {
t.Fatalf("unexpected packages len: %d", len(actualPkgs))
t.Fatalf("unexpected packages len: %d != %d", len(expectedPkgs), len(actualPkgs))
}
for _, p := range actualPkgs {