test

package
v1.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: MPL-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Timeout        = "timeout"
	SuppressIssues = "suppress-issues"
	JSON           = "json"
)

Variables

View Source
var Cmd = cli.Command{
	Name:   "test",
	Usage:  "Test current revision against FOSSA scan status and exit with errors if issues are found",
	Action: Run,
	Flags: flags.WithGlobalFlags(flags.WithAPIFlags([]cli.Flag{
		cli.IntFlag{Name: Timeout, Value: 10 * 60, Usage: "duration to wait for build completion (in seconds)"},
		cli.BoolFlag{Name: SuppressIssues, Usage: "don't exit with code 1 if issues are found"},
		cli.BoolFlag{Name: JSON, Usage: "format failed issues as JSON"},
	})),
}
View Source
var PollRequestDelay = 8 * time.Second

Functions

func CheckBuild

func CheckBuild(locator fossa.Locator, stop <-chan time.Time) (fossa.Build, *errors.Error)

CheckBuild polls the latest_build endpoint until the most recently uploaded build has succeeded.

func CheckIssues

func CheckIssues(locator fossa.Locator, stop <-chan time.Time) (fossa.Issues, *errors.Error)

CheckIssues polls the issues endpoint until an issue scan has been run on the latest project revision.

func Do

func Do(stop <-chan time.Time) (fossa.Issues, *errors.Error)

func Run

func Run(ctx *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL