ifacetestenv

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 14 Imported by: 0

Documentation

Overview

Package ifacetestenv provides a test fixture for a face type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLocatorMarshal

func CheckLocatorMarshal(t testing.TB, loc iface.Locator)

CheckLocatorMarshal checks JSON marshaling of a Locator.

Types

type Fixture

type Fixture struct {
	PayloadLen      int     // Data payload length
	DataFrames      int     // expected number of LpPackets per Data packet
	TxIterations    int     // number of TX iterations
	TxLossTolerance float64 // permitted TX packet loss (counter discrepancy)
	RxLossTolerance float64 // permitted RX packet loss

	NRxInterests int
	NRxData      int
	NRxNacks     int
	// contains filtered or unexported fields
}

Fixture runs a test that sends and receives packets between a pair of connected faces.

The calling test case must create two faces that are connected together. The fixture sends L3 packets on one face, and expects to receive them on the other face.

func NewFixture

func NewFixture(t testing.TB) (fixture *Fixture)

NewFixture creates a Fixture.

func (*Fixture) CheckCounters

func (fixture *Fixture) CheckCounters()

CheckCounters checks the counters are within acceptable range.

func (*Fixture) RunTest

func (fixture *Fixture) RunTest(txFace, rxFace iface.Face)

RunTest runs the test.

Jump to

Keyboard shortcuts

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