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 stdout 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 60Where 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 revisionToComparefossa test --revision 34021e --diff v2.0.0This 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.0has issue:A, and the revision34021ehas issueA,fossa-clireports no new issues discovered and exits with status code of 0.
-
If the revision
v2.0.0has issue:A, and the revision34021ehas 0 issues,fossa-clireports no new issues discovered and exits with status code of 0.
-
If the revision
v2.0.0has issue:A, and the revision34021ehas issuesA,B,fossa-clireports issueBand exits with status code of 1.