utils

package
v0.0.0-...-60cae77 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServer

func CreateServer(handler http.HandlerFunc) *httptest.Server

createServer is a helper function to create a fake server where http requsts will be rerouted for testing

func DefaultHandler

func DefaultHandler(w http.ResponseWriter, req *http.Request)

func GetTestOptions

func GetTestOptions(server *httptest.Server) []option.ClientOption

func SendResponse

func SendResponse(w http.ResponseWriter, response interface{})

Types

type TestInstance

type TestInstance struct {
	Name              string
	CreationTimestamp string
	Zone              string
}

Jump to

Keyboard shortcuts

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