testing

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WorkerRpcAddr       = "localhost:53480"
	WorkerTelemetryAddr = "localhost:53470"
)

Functions

func NewRpcClient

func NewRpcClient(
	t *testing.T, ctx context.Context, addr string, stateStruct am.Struct,
	stateNames am.S,
) *arpc.Client

func NewRpcTest

func NewRpcTest(
	t *testing.T, ctx context.Context, worker *am.Machine,
	getter func(string) any,
) (*am.Machine, *arpc.Server, *arpc.Client)

NewRpcTest creates a new rpc server and client for testing, which expose the passed worker instance, along with its RPC getter.

func NewTestWorker

func NewTestWorker(
	realTty bool, opts debugger.Opts,
) (*debugger.Debugger, error)

NewTestWorker creates a new worker instance of the am-dbg.

func RpcGet

func RpcGet[G any](
	t *testing.T, c *arpc.Client, name server.GetField, defVal G,
) G

RpcGet retrieves a value from the RPC server.

func RpcShutdown

func RpcShutdown(ctx context.Context, c *arpc.Client, s *arpc.Server)

RpcShutdown shuts down the passed client and optionally a server.

Types

This section is empty.

Directories

Path Synopsis
cmd
am-dbg-worker
AM_DBG_WORKER_ADDR AM_DBG_ADDR
AM_DBG_WORKER_ADDR AM_DBG_ADDR

Jump to

Keyboard shortcuts

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