testutil

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testutil provides shared test utilities for CloudMock service tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLocator

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

MockLocator is a ServiceLocator for unit tests that returns pre-configured services.

func NewMockLocator

func NewMockLocator(services map[string]service.Service) *MockLocator

NewMockLocator creates a MockLocator from a map of service name → service.

func (*MockLocator) Lookup

func (m *MockLocator) Lookup(name string) (service.Service, error)

Lookup returns the service registered under the given name, or an error if not found.

func (*MockLocator) Register

func (m *MockLocator) Register(svc service.Service)

Register adds a service to the mock locator.

Jump to

Keyboard shortcuts

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