The test command checks whether the most-recent scan of your FOSSA project raised license-policy or vulnerability issues. This command is usually run immediately after fossa analyze
- If there are issues, it prints them to stderr and fails with an exit code of 1
- If there are no issues, it prints nothing and succeeds with an exit code of 0
fossa test
supports the Common FOSSA Project Flags supported by all commands
By default, fossa test
waits a maximum of 3600 seconds (1 hour) for issue scan results. To override the default timeout, use, e.g.:
fossa test --timeout 60
Where 60
is the maximum number of seconds to wait for issue scan results.
By default, fossa test
displays issues in a human-readable format. To instead print issues as JSON, use:
fossa test --format json
--diff <REVISION>
configures FOSSA to only report new issues observed with the current revision that weren't already reported on the specified <REVISION>
.
fossa test --diff revisionToCompare
fossa test --revision 34021e --diff v2.0.0
This only reports issues that are present in 34021e
revision,
BUT are not present in revision v2.0.0
.
For instance,
-
If the revision
v2.0.0
has issue:A
, and the revision34021e
has issueA
,fossa-cli
reports no new issues discovered and exits with status code of 0.
-
If the revision
v2.0.0
has issue:A
, and the revision34021e
has 0 issues,fossa-cli
reports no new issues discovered and exits with status code of 0.
-
If the revision
v2.0.0
has issue:A
, and the revision34021e
has issuesA
,B
,fossa-cli
reports issueB
and exits with status code of 1.