testreporters

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 13 Imported by: 1

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 added in v1.0.53

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 added in v1.0.53

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

SendSlackNotification sends a slack notification on the results of the test

func (*KeeperBlockTimeTestReporter) SetNamespace added in v1.0.53

func (k *KeeperBlockTimeTestReporter) SetNamespace(namespace string)

func (*KeeperBlockTimeTestReporter) WriteReport

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

type OCRSoakTestReport added in v1.0.53

type OCRSoakTestReport struct {
	ContractAddress string
	TotalRounds     uint

	LongestRoundTime  time.Duration
	ShortestRoundTime time.Duration

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

func (*OCRSoakTestReport) UpdateReport added in v1.0.53

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

UpdateReport updates the report based on the latest info

type OCRSoakTestReporter added in v1.0.53

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

func (*OCRSoakTestReporter) SendSlackNotification added in v1.0.53

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

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

func (*OCRSoakTestReporter) SetNamespace added in v1.0.53

func (o *OCRSoakTestReporter) SetNamespace(namespace string)

SetNamespace sets the namespace of the report for clean reports

func (*OCRSoakTestReporter) WriteReport added in v1.0.53

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