servertest

package
v0.94.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package servertest 为测试 web.Server 提供一些简便的功能

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete added in v0.71.0

func Delete(a *assert.Assertion, path string) *rest.Request

func Get added in v0.71.0

func Get(a *assert.Assertion, path string) *rest.Request

func NewRequest added in v0.71.0

func NewRequest(a *assert.Assertion, method, path string) *rest.Request

NewRequest 发起测试请求

功能与 rest.NewRequest 相同,默认指定了 client 参数。

func Patch added in v0.87.1

func Patch(a *assert.Assertion, path string, body []byte) *rest.Request

func Post added in v0.71.0

func Post(a *assert.Assertion, path string, body []byte) *rest.Request

func Run added in v0.71.0

func Run(a *assert.Assertion, s web.Server) func()

Run 运行服务内容并返回等待退出的方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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