testreporters

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 13 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 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
	// 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

Jump to

Keyboard shortcuts

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