Documentation ¶
Overview ¶
Package testserver provides fake Terramate Cloud endpoints for testing purposes.
Index ¶
Constants ¶
View Source
const DefaultOrgUUID = "0000-1111-2222-3333"
DefaultOrgUUID is the test organization UUID.
Variables ¶
This section is empty.
Functions ¶
func EnableAllConfig ¶
EnableAllConfig returns a map that enables all cloud endpoints.
func RouterAdd ¶ added in v0.4.2
func RouterAdd(router *httprouter.Router, enabled map[string]bool)
RouterAdd enables endpoints in an existing router.
func RouterAddCustoms ¶ added in v0.4.2
func RouterAddCustoms(router *httprouter.Router, custom Custom)
RouterAddCustoms add custom routes to the fake server. This is used by very specific test cases which requires injection of custom errors in the server.
func RouterWith ¶
func RouterWith(enabled map[string]bool) *httprouter.Router
RouterWith returns the testserver router configuration only for the enabled endpoints.
Types ¶
Click to show internal directories.
Click to hide internal directories.