mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user