typestest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package typestest provides shared test helpers for pkg/types implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecordingAuditor

type RecordingAuditor struct {
	// contains filtered or unexported fields
}

RecordingAuditor is a thread-safe types.Auditor that captures every ResourceTagCreated event for assertions in tests. The mutex is load-bearing because the v1alpha1store concurrency test invokes the auditor from multiple goroutines.

func (*RecordingAuditor) Events

func (r *RecordingAuditor) Events() []ResourceTagEvent

Events returns a copy of the captured events. Callers may mutate the returned slice without affecting the auditor's internal state.

func (*RecordingAuditor) ResourceTagCreated

func (r *RecordingAuditor) ResourceTagCreated(_ context.Context, kind, namespace, name, tag string)

ResourceTagCreated records the event under the auditor's mutex.

type ResourceTagEvent

type ResourceTagEvent struct {
	Kind      string
	Namespace string
	Name      string
	Tag       string
}

ResourceTagEvent is one captured Auditor.ResourceTagCreated call.

Jump to

Keyboard shortcuts

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