testreporters

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 14 Imported by: 5

Documentation

Overview

Package testreporters holds all the tools necessary to report on tests that are run utilizing the testsetups package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateSlackEnvVars

func UpdateSlackEnvVars()

UpdateSlackEnvVars updates the slack environment variables in case they are changed while remote test is running. Usually used for unit tests.

Types

type ChainlinkProfileTestReporter added in v1.1.22

type ChainlinkProfileTestReporter struct {
	Results []*client.ChainlinkProfileResults
	// contains filtered or unexported fields
}

func (*ChainlinkProfileTestReporter) SendSlackNotification added in v1.1.22

func (c *ChainlinkProfileTestReporter) SendSlackNotification(slackClient *slack.Client) error

SendNotification hasn't been implemented for this test

func (*ChainlinkProfileTestReporter) SetNamespace added in v1.1.22

func (c *ChainlinkProfileTestReporter) SetNamespace(namespace string)

SetNamespace sets the namespace of the report for clean reports

func (*ChainlinkProfileTestReporter) WriteReport added in v1.1.22

func (c *ChainlinkProfileTestReporter) WriteReport(folderLocation string) error

WriteReport create the profile files

type KeeperBlockTimeTestReport

type KeeperBlockTimeTestReport struct {
	ContractAddress        string  `json:"contractAddress"`
	TotalExpectedUpkeeps   int64   `json:"totalExpectedUpkeeps"`
	TotalSuccessfulUpkeeps int64   `json:"totalSuccessfulUpkeeps"`
	AllMissedUpkeeps       []int64 `json:"allMissedUpkeeps"` // List of each time an upkeep was missed, represented by how many blocks it was missed by
}

KeeperBlockTimeTestReport holds a report information for a single Upkeep Consumer contract

type KeeperBlockTimeTestReporter

type KeeperBlockTimeTestReporter struct {
	Reports                        []KeeperBlockTimeTestReport `json:"reports"`
	ReportMutex                    sync.Mutex
	AttemptedChainlinkTransactions []*client.TransactionsData `json:"attemptedChainlinkTransactions"`
	// contains filtered or unexported fields
}

KeeperBlockTimeTestReporter enables reporting on the keeper block time test

func (*KeeperBlockTimeTestReporter) SendSlackNotification

func (k *KeeperBlockTimeTestReporter) SendSlackNotification(slackClient *slack.Client) error

SendSlackNotification sends a slack notification on the results of the test

func (*KeeperBlockTimeTestReporter) SetNamespace

func (k *KeeperBlockTimeTestReporter) SetNamespace(namespace string)

func (*KeeperBlockTimeTestReporter) WriteReport

func (k *KeeperBlockTimeTestReporter) WriteReport(folderLocation string) error

type LongerThanExpectedRound

type LongerThanExpectedRound struct {
	RoundID     uint
	RoundTime   time.Duration
	BlockLength uint
	Timestamp   time.Time
}

type OCRSoakTestReport

type OCRSoakTestReport struct {
	ContractAddress          string
	TotalRounds              uint
	ExpectedRoundtime        time.Duration
	LongerThanExpectedRounds []*LongerThanExpectedRound

	LongestRoundTime  time.Duration
	ShortestRoundTime time.Duration

	LongestRoundBlocks  uint
	ShortestRoundBlocks uint
	// contains filtered or unexported fields
}

func (*OCRSoakTestReport) UpdateReport

func (o *OCRSoakTestReport) UpdateReport(roundTime time.Duration, blockLength uint)

UpdateReport updates the report based on the latest info

type OCRSoakTestReporter

type OCRSoakTestReporter struct {
	Reports            map[string]*OCRSoakTestReport // contractAddress: Report
	ExpectedRoundTime  time.Duration
	UnexpectedShutdown bool
	// contains filtered or unexported fields
}

func (*OCRSoakTestReporter) SendSlackNotification

func (o *OCRSoakTestReporter) SendSlackNotification(slackClient *slack.Client) error

SendNotification sends a slack message to a slack webhook and uploads test artifacts

func (*OCRSoakTestReporter) SetNamespace

func (o *OCRSoakTestReporter) SetNamespace(namespace string)

SetNamespace sets the namespace of the report for clean reports

func (*OCRSoakTestReporter) WriteReport

func (o *OCRSoakTestReporter) WriteReport(folderLocation string) error

WriteReport writes OCR Soak test report to logs

type TestReporter

type TestReporter interface {
	WriteReport(folderLocation string) error
	SendSlackNotification(slackClient *slack.Client) error
	SetNamespace(namespace string)
}

TestReporter is a general interface for all test reporters

type VRFV2SoakTestReport added in v1.2.4

type VRFV2SoakTestReport struct {
	ContractAddress string
	TotalRounds     uint

	LongestRoundTime  time.Duration
	ShortestRoundTime time.Duration

	LongestRoundBlocks  uint
	ShortestRoundBlocks uint
	// contains filtered or unexported fields
}

func (*VRFV2SoakTestReport) UpdateReport added in v1.2.4

func (o *VRFV2SoakTestReport) UpdateReport(roundTime time.Duration, blockLength uint)

UpdateReport updates the report based on the latest info

type VRFV2SoakTestReporter added in v1.2.4

type VRFV2SoakTestReporter struct {
	Reports map[string]*VRFV2SoakTestReport // contractAddress: Report
	// contains filtered or unexported fields
}

func (*VRFV2SoakTestReporter) SendSlackNotification added in v1.2.4

func (o *VRFV2SoakTestReporter) SendSlackNotification(slackClient *slack.Client) error

SendNotification sends a slack message to a slack webhook and uploads test artifacts

func (*VRFV2SoakTestReporter) SetNamespace added in v1.2.4

func (o *VRFV2SoakTestReporter) SetNamespace(namespace string)

SetNamespace sets the namespace of the report for clean reports

func (*VRFV2SoakTestReporter) WriteReport added in v1.2.4

func (o *VRFV2SoakTestReporter) WriteReport(folderLocation string) error

WriteReport writes VRFV2 Soak test report to logs

Jump to

Keyboard shortcuts

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