testutil

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil contains utility functions for test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlamelist

func CreateBlamelist(nCommits int) *pb.BlameList

func CreateCompileFailureAnalysisAnalysisChain

func CreateCompileFailureAnalysisAnalysisChain(c context.Context, t testing.TB, bbid int64, project string, analysisID int64) (*model.LuciFailedBuild, *model.CompileFailure, *model.CompileFailureAnalysis)

func CreateLUCIFailedBuild

func CreateLUCIFailedBuild(c context.Context, t testing.TB, id int64, project string) *model.LuciFailedBuild

func CreateSuspect

func CreateSuspect(ctx context.Context, t testing.TB, option *SuspectCreationOption) *model.Suspect

func CreateTestFailure

func CreateTestFailure(ctx context.Context, t testing.TB, option *TestFailureCreationOption) *model.TestFailure

func UpdateIndices

func UpdateIndices(c context.Context)

Types

type SuspectCreationOption

type SuspectCreationOption struct {
	ID                 int64
	ParentKey          *datastore.Key
	CommitID           string
	ReviewURL          string
	ReviewTitle        string
	SuspectRerunKey    *datastore.Key
	ParentRerunKey     *datastore.Key
	VerificationStatus model.SuspectVerificationStatus
	ActionDetails      model.ActionDetails
	AnalysisType       pb.AnalysisType
}

type TestFailureAnalysisCreationOption

type TestFailureAnalysisCreationOption struct {
	ID                 int64
	Project            string
	Bucket             string
	Builder            string
	TestFailureKey     *datastore.Key
	StartCommitHash    string
	EndCommitHash      string
	FailedBuildID      int64
	Priority           int32
	Status             pb.AnalysisStatus
	RunStatus          pb.AnalysisRunStatus
	CreateTime         time.Time
	StartTime          time.Time
	EndTime            time.Time
	VerifiedCulpritKey *datastore.Key
}

type TestFailureCreationOption

type TestFailureCreationOption struct {
	ID               int64
	Project          string
	Variant          map[string]string
	IsPrimary        bool
	Analysis         *model.TestFailureAnalysis
	Ref              *pb.SourceRef
	TestID           string
	VariantHash      string
	StartHour        time.Time
	RefHash          string
	StartPosition    int64
	EndPosition      int64
	StartFailureRate float64
	EndFailureRate   float64
	IsDiverged       bool
}

type TestNthSectionAnalysisCreationOption

type TestNthSectionAnalysisCreationOption struct {
	ID                int64
	ParentAnalysisKey *datastore.Key
	BlameList         *pb.BlameList
	Status            pb.AnalysisStatus
	RunStatus         pb.AnalysisRunStatus
	StartTime         time.Time
	EndTime           time.Time
	CulpritKey        *datastore.Key
}

type TestSingleRerunCreationOption

type TestSingleRerunCreationOption struct {
	ID                    int64
	Status                pb.RerunStatus
	AnalysisKey           *datastore.Key
	Type                  model.RerunBuildType
	TestResult            model.RerunTestResults
	NthSectionAnalysisKey *datastore.Key
	CulpritKey            *datastore.Key
	CreateTime            time.Time
	StartTime             time.Time
	ReportTime            time.Time
	EndTime               time.Time
	BuildStatus           bbpb.Status
	GitilesCommit         *bbpb.GitilesCommit
}

Jump to

Keyboard shortcuts

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