test

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package test contains test util functions for goproxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPTestMethod

func HTTPTestMethod(t *testing.T, r *http.Request, want string)

HTTPTestMethod reports error http.Request does not return want string.

func NewFakeGoproxy

func NewFakeGoproxy() (scheme string, host string, mux *http.ServeMux, teardown func())

NewFakeGoproxy sets up a test HTTP server along with a github.Client that is configured to talk to that test server. Tests should register handlers on mux which provide mock responses for the API method being tested.

Types

This section is empty.

Jump to

Keyboard shortcuts

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