forgetest

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package forgetest is a canned forge API for adapter tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*httptest.Server
	// contains filtered or unexported fields
}

Server answers each request with the body routed by "METHOD path?query", then "METHOD path", then "path" (any method); writes without a route get {}. Calls records "METHOD path body".

func New

func New(t *testing.T, routes map[string]string) *Server

func (*Server) Called

func (s *Server) Called(prefix string) bool

Called reports whether a request starting with prefix ("POST /x/approve") was made.

Jump to

Keyboard shortcuts

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