nodetest

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyEventsES

type DummyEventsES struct {
	Events []*node.EventData
	Mux    sync.Mutex
}

This captures events meant to be sent to elastic search. This allows verification of events/audit logs in unit-tests, without needing to run elastic search. This does not capture jaeger logs.

func (*DummyEventsES) GetNumEvents

func (s *DummyEventsES) GetNumEvents() int

func (*DummyEventsES) Handle

func (s *DummyEventsES) Handle(req *http.Request) (*http.Response, error)

func (*DummyEventsES) HandleIgnore

func (s *DummyEventsES) HandleIgnore(req *http.Request) (*http.Response, error)

func (*DummyEventsES) InitHttpMock

func (s *DummyEventsES) InitHttpMock(addr string, mockTransport *httpmock.MockTransport)

This assumes httpmock has already been initialized via: httpmock.Activate() defer httpmock.DeactiveAndReset()

func (*DummyEventsES) WaitLastEventMatches

func (s *DummyEventsES) WaitLastEventMatches(startEvent int, matchFunc func(e *node.EventData) bool) bool

Jump to

Keyboard shortcuts

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