jsonreport

package
v0.0.0-...-703489d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateReport(repo string, flaky []string, writeFile bool) (*Report, error)
	GetFlakyTests(jobName, repo string) ([]string, error)
	GetReportRepos(jobName string) ([]string, error)
	GetFlakyTestReport(jobName, repo string, buildID int) ([]Report, error)
}

JSONClient contains the set of operations a JSON reporter needs

func Initialize

func Initialize() (Client, error)

Initialize wraps prow's init, which must be called before any other prow functions are used.

type JSONClient

type JSONClient struct{}

Client is simply a way to call methods, it does not contain any data itself

func (*JSONClient) CreateReport

func (c *JSONClient) CreateReport(repo string, flaky []string, writeFile bool) (*Report, error)

CreateReport generates a flaky report for a given repository, and optionally writes it to disk.

func (*JSONClient) GetFlakyTestReport

func (c *JSONClient) GetFlakyTestReport(jobName, repo string, buildID int) ([]Report, error)

GetFlakyTestReport collects flaky test reports from the given buildID and repo. Use repo = "" to get reports from all repositories, and buildID = -1 to get the most recent report

func (*JSONClient) GetFlakyTests

func (c *JSONClient) GetFlakyTests(jobName, repo string) ([]string, error)

GetFlakyTests gets the latest flaky tests from the given repo

func (*JSONClient) GetReportRepos

func (c *JSONClient) GetReportRepos(jobName string) ([]string, error)

GetReportRepos gets all of the repositories where we collect flaky tests.

type Report

type Report struct {
	Repo  string   `json:"repo"`
	Flaky []string `json:"flaky"`
}

Report contains concise information about current flaky tests in a given repo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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