elastic_helper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFailuresForRun

func GetFailuresForRun(buildID int, buildEnvironment, esURL, index string) (*elastic.SearchResult, error)

GetFailuresForRun returns failed test for a given run <buildEnvironment, buildID>

func StoreResults

func StoreResults(report *ginkgoTypes.Report, runID int64, info *ElasticInfo)

StoreResults store test results in elastic db. - report is the list of tests - buildID is current run id - buildEnvironment is current run environment

func VerifyInfo

func VerifyInfo(ctx context.Context, info *ElasticInfo) error

VerifyInfo verifies provided info (elastic DB and Index) are correct

Types

type ElasticInfo

type ElasticInfo struct {
	URL    string // elastic DB URL
	Index  string // elastic DB Index
	DryRun bool   // indicates if this is a dryRun
}

type ElasticResult

type ElasticResult struct {
	// Name is the name of the test
	Name string `json:"name"`
	// Description is the test description
	Description string `json:"description"`
	// Maintainer is the maintainer for a given test
	Maintainer string `json:"maintainer"`
	// DurationInMinutes is the duration of the test in minutes
	DurationInMinutes float64 `json:"durationInMinutes"`
	// Duration is the duration of the test in seconds
	DurationInSecond time.Duration `json:"durationInSeconds"`
	// Result indicates whether test passed or failed or it was skipped
	Result string `json:"result"`
	// Run is the sanity run id
	Run int64 `json:"run"`
	// StartTime is the time test started
	StartTime time.Time `json:"startTime"`
	// Serial indicates whether test was run in serial
	Serial bool `json:"serial"`
}

Jump to

Keyboard shortcuts

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