fake

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegistrationToken = "fake-registration-token"

	RunnersListBody = `` /* 178-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func NewServer

func NewServer(opts ...Option) *httptest.Server

NewServer creates a fake server for running unit tests

Types

type FixedResponses added in v0.6.0

type FixedResponses struct {
	ListRepositoryWorkflowRuns *Handler
}

type Handler added in v0.7.2

type Handler struct {
	Status int
	Body   string
}

func (*Handler) ServeHTTP added in v0.7.2

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Option added in v0.6.0

type Option func(*ServerConfig)

func WithFixedResponses added in v0.7.2

func WithFixedResponses(responses *FixedResponses) Option

func WithListRepositoryWorkflowRunsResponse added in v0.6.0

func WithListRepositoryWorkflowRunsResponse(status int, body string) Option

type ServerConfig added in v0.7.2

type ServerConfig struct {
	*FixedResponses
}

Jump to

Keyboard shortcuts

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