apitest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestOrigin = "https://wrgl.test"
)

Variables

This section is empty.

Functions

func AssertCommitsPersisted

func AssertCommitsPersisted(t *testing.T, db objects.Store, commits [][]byte)

func AssertResp

func AssertResp(t *testing.T, resp *http.Response, statusCode int, message string)

func CopyCommitsToNewStore

func CopyCommitsToNewStore(t *testing.T, src, dst objects.Store, commits [][]byte)

func CreateRandomCommit

func CreateRandomCommit(t *testing.T, db objects.Store, numCols, numRows int, parents [][]byte) ([]byte, *objects.Commit)

func FetchObjects

func FetchObjects(t *testing.T, db objects.Store, rs ref.Store, advertised [][]byte, havesPerRoundTrip int) [][]byte

func Get

func Get(t *testing.T, path string) *http.Response

func PostMultipartForm

func PostMultipartForm(t *testing.T, path string, value map[string][]string, files map[string]io.Reader) *http.Response

func PushObjects

func PushObjects(t *testing.T, db objects.Store, rs ref.Store, updates map[string]*payload.Update, remoteRefs map[string][]byte, maxPackfileSize uint64) map[string]*payload.Update

func ReceivePackConfig

func ReceivePackConfig(denyNonFastForwards, denyDeletes bool) *conf.Config

func RegisterHandler

func RegisterHandler(method, path string, handler http.Handler)

func RegisterHandlerWithOrigin

func RegisterHandlerWithOrigin(origin, method, path string, handler http.Handler)

Types

This section is empty.

Jump to

Keyboard shortcuts

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