clienttest

package
v0.0.0-...-45e3bc7 Latest Latest
Warning

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

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

Documentation

Overview

Package clienttest provides helpers for unit tests of pkg/client and its subpackages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONHandler

func JSONHandler(statusCode int, body string) http.HandlerFunc

JSONHandler returns a handler that serves a fixed JSON response.

func NewClient

func NewClient(t *testing.T, handler http.Handler) *client.Client

NewClient creates a Client pointed at an httptest server using handler.

func RunBulkInfoUpdateBadRequestUnauthorizedErrorTests

func RunBulkInfoUpdateBadRequestUnauthorizedErrorTests(
	t *testing.T,
	request types.BulkInfoUpdateRQ,
	call func(*client.Client, context.Context, types.BulkInfoUpdateRQ) error,
)

RunBulkInfoUpdateBadRequestUnauthorizedErrorTests runs shared bulk-update error tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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