test

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildName = "build.data"
	BuildSize = 200 * 1024 * 1024
	Dir       = "./"
	BuildFile = Dir + BuildName

	ExternalDownloadUrl  = "https://raw.githubusercontent.com/GopeedLab/gopeed/v1.5.6/_docs/img/banner.png"
	ExternalDownloadName = "banner.png"
	ExternalDownloadSize = 26416

	DownloadName       = "download.data"
	DownloadRename     = "download (1).data"
	DownloadFile       = Dir + DownloadName
	DownloadRenameFile = Dir + DownloadRename
)

Variables

This section is empty.

Functions

func AssertResourceEqual added in v1.5.4

func AssertResourceEqual(want, got *base.Resource) bool

func DirMd5

func DirMd5(dirPath string) string

func FileMd5

func FileMd5(filePath string) string

func JsonEqual

func JsonEqual(v1 any, v2 any) bool

func StartSocks5Server added in v1.5.1

func StartSocks5Server(usr, pwd string) net.Listener

func StartTestCustomServer added in v1.3.3

func StartTestCustomServer() net.Listener

func StartTestErrorServer

func StartTestErrorServer() net.Listener

func StartTestFileServer

func StartTestFileServer() net.Listener

func StartTestLimitServer added in v1.4.2

func StartTestLimitServer(maxConnections int32, delay int64) net.Listener

StartTestLimitServer connections limit server

func StartTestPostServer

func StartTestPostServer() net.Listener

func StartTestRetryServer

func StartTestRetryServer() net.Listener

func StartTestSlowFileServer

func StartTestSlowFileServer(delay time.Duration) net.Listener

func ToJson

func ToJson(v interface{}) string

Types

type SlowFileServer

type SlowFileServer struct {
	// contains filtered or unexported fields
}

func (*SlowFileServer) ServeHTTP

func (s *SlowFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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