testing

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEvents

func AssertEvents(t *testing.T, eventsCh chan string, expectedEvents Events)

FakeEventRecorders(aka.: FakeRecorders) push the "sent" events into a string channel, using this format: "eventType eventReason eventMessage" So this function just parses this format and compares the produced fields with the fields of the provided Event structs IN ORDER. In case of the Event.Message field it only checks if it "CONTAINED" in sent event.

Types

type Event

type Event struct {
	EventType string
	Reason    string
	Message   string
}

type Events

type Events []Event

Jump to

Keyboard shortcuts

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