scenarioverify

package
v1.0.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonSelectorAbsent     = "SELECTOR_ABSENT"
	ReasonRequiredSkip       = "REQUIRED_SKIP"
	ReasonIncompleteEvidence = "INCOMPLETE_EVIDENCE"
	ReasonTestFailure        = "TEST_FAILURE"
	ReasonPackageFailure     = "PACKAGE_FAILURE"
	ReasonMalformedIndex     = "MALFORMED_INDEX"
	ReasonUnknownLane        = "UNKNOWN_LANE"
	ReasonEmptyRequiredSet   = "EMPTY_REQUIRED_SET"
)
View Source
const (
	IndexVersion = 1
)

Variables

This section is empty.

Functions

func FocusedCommand

func FocusedCommand(sc Scenario, lane string) string

func WriteJSON

func WriteJSON(w io.Writer, r *Report) error

func WriteText

func WriteText(w io.Writer, r *Report) error

Types

type Budgets

type Budgets struct {
	MaxPayloadBytes int    `yaml:"max_payload_bytes"`
	MaxDuration     string `yaml:"max_duration"`
}

type DecodeLimits

type DecodeLimits struct {
	MaxInputBytes  int64
	MaxRecordBytes int64
	MaxEvents      int
	MaxIdentities  int
}

type Event

type Event struct {
	Time        time.Time `json:"Time"`
	Action      string    `json:"Action"`
	Package     string    `json:"Package"`
	Test        string    `json:"Test"`
	Elapsed     *float64  `json:"Elapsed"`
	Output      string    `json:"Output"`
	Failed      bool      `json:"Failed"`
	ImportPath  string    `json:"ImportPath"`
	FailedBuild string    `json:"FailedBuild"`
}

type Index

type Index struct {
	Version   int        `yaml:"version"`
	Lanes     []string   `yaml:"lanes"`
	Scenarios []Scenario `yaml:"scenarios"`
	// contains filtered or unexported fields
}

func LoadIndex

func LoadIndex(ctx context.Context, path string) (*Index, error)

func ParseIndex

func ParseIndex(ctx context.Context, data []byte) (*Index, error)

func (*Index) HasLane

func (idx *Index) HasLane(lane string) bool

func (*Index) Required

func (idx *Index) Required(lane string) ([]Scenario, error)

type Report

type Report struct {
	Lane           string
	Revision       string
	GoStatus       int
	CaptureStatus  int
	VerifierStatus int
	Required       string
	LaneReason     string
	Scenarios      []ScenarioResult
	ObservedFail   bool
}

func Verify

func Verify(ctx context.Context, idx *Index, events io.Reader, opts VerifyOptions) (*Report, error)

func (*Report) Failed

func (r *Report) Failed() bool

type Scenario

type Scenario struct {
	ID               string   `yaml:"id"`
	OwnerPackage     string   `yaml:"owner_package"`
	OwnerIssue       string   `yaml:"owner_issue"`
	Package          string   `yaml:"package"`
	Test             string   `yaml:"test"`
	Lanes            []string `yaml:"lanes"`
	Prerequisites    []string `yaml:"prerequisites"`
	ExpectedBoundary string   `yaml:"expected_boundary"`
	Nonclaims        []string `yaml:"nonclaims"`
	Budgets          Budgets  `yaml:"budgets"`
}

type ScenarioResult

type ScenarioResult struct {
	ID       string
	Package  string
	Test     string
	Status   string
	Reason   string
	Boundary string
	Observed string
}

type VerifyOptions

type VerifyOptions struct {
	Lane          string
	Revision      string
	GoStatus      int
	CaptureStatus int
	GoStatusSet   bool
	Limits        DecodeLimits
}

Jump to

Keyboard shortcuts

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