clienttest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package clienttest is the conformance suite of client.Client: any implementation (in process, over HTTP, a future one) must pass Run, so that a front end behaves the same against all of them.

The suite builds its own harness (a scripted model, a fake sandbox) and asks the implementation under test for clients of two users over it:

clienttest.Run(t, func(t *testing.T, h *harness.Harness, user string) client.Client {
	return inproc.New(h, user, inproc.WithModels(clienttest.Models, clienttest.DefaultModel))
})

Index

Constants

View Source
const DefaultModel = "gpt-test"

DefaultModel is the default model of the clients under test.

Variables

View Source
var Models = []string{"gpt-test"}

Models and DefaultModel are what the clients under test must report from Models.

Functions

func Run

func Run(t *testing.T, mk Factory)

Run runs the suite.

Types

type Factory

type Factory func(t *testing.T, h *harness.Harness, user string) client.Client

Factory returns a client acting for user over h.

Jump to

Keyboard shortcuts

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