Allow for cataloging a single file (#608)

* allow for cataloging a single file

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* use all catalogers for file schemes

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2021-11-02 12:09:06 -04:00
committed by GitHub
parent a2882ee810
commit 3ac95ac4f6
8 changed files with 199 additions and 54 deletions
+10
View File
@@ -75,6 +75,16 @@ func assertInOutput(data string) traitAssertion {
}
}
func assertStdoutLengthGreaterThan(length uint) traitAssertion {
return func(tb testing.TB, stdout, _ string, _ int) {
tb.Helper()
if uint(len(stdout)) < length {
tb.Errorf("not enough output (expected at least %d, got %d)", length, len(stdout))
}
}
}
func assertFailingReturnCode(tb testing.TB, _, _ string, rc int) {
tb.Helper()
if rc == 0 {