proxytest

package
v0.55.0 Latest Latest
Warning

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

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

Documentation

Overview

Package proxytest provides utilities shared by the tests of the datasource proxies. It must only be imported by tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultGuard

func NewDefaultGuard(t testing.TB) *netguard.Guard

NewDefaultGuard returns a guard applying the default policy (e.g. the loopback interface is denied).

func NewLoopbackGuard

func NewLoopbackGuard(t testing.TB) *netguard.Guard

NewLoopbackGuard returns a guard allowing the loopback interface, as the test servers are listening on it.

func RequireHTTPError

func RequireHTTPError(t testing.TB, err error, code int)

RequireHTTPError verifies the HTTP status code the error is translated to by the error middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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