package astest
import "github.com/AdRoll/goamz/autoscaling/astest"
Index ¶
- Variables
- type HTTPServer
- func NewHTTPServer() *HTTPServer
- func (s *HTTPServer) Flush()
- func (s *HTTPServer) Response(status int, headers map[string]string, body string)
- func (s *HTTPServer) ResponseFunc(n int, f ResponseFunc)
- func (s *HTTPServer) ResponseMap(n int, m ResponseMap)
- func (s *HTTPServer) Responses(n int, status int, headers map[string]string, body string)
- func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *HTTPServer) Start()
- func (s *HTTPServer) WaitRequest() *http.Request
- func (s *HTTPServer) WaitRequests(n int) []*http.Request
- type Response
- type ResponseFunc
- type ResponseMap
Variables ¶
var BasicGroupResponse = "" /* 339 byte string literal not displayed */
var CreateAutoScalingGroupResponse = "" /* 234 byte string literal not displayed */
var CreateLaunchConfigurationResponse = "" /* 240 byte string literal not displayed */
var DeleteScheduledActionResponse = "" /* 232 byte string literal not displayed */
var DescribeAutoScalingGroupResponse = "" /* 1632 byte string literal not displayed */
var DescribeLaunchConfigurationResponse = "" /* 1122 byte string literal not displayed */
var DescribeScheduledActionsResponse = "" /* 916 byte string literal not displayed */
var PutScheduledUpdateGroupActionResponse = "" /* 248 byte string literal not displayed */
var ResumeProcessesResponse = "" /* 220 byte string literal not displayed */
var SetDesiredCapacityResponse = "" /* 226 byte string literal not displayed */
var SuspendProcessesResponse = "" /* 222 byte string literal not displayed */
var UpdateAutoScalingGroupResponse = "" /* 234 byte string literal not displayed */
Types ¶
type HTTPServer ¶
type HTTPServer struct { URL string Timeout time.Duration // contains filtered or unexported fields }
func NewHTTPServer ¶
func NewHTTPServer() *HTTPServer
func (*HTTPServer) Flush ¶
func (s *HTTPServer) Flush()
Flush discards all pending requests and responses.
func (*HTTPServer) Response ¶
func (s *HTTPServer) Response(status int, headers map[string]string, body string)
Response prepares the test server to respond the following request using the provided response parameters.
func (*HTTPServer) ResponseFunc ¶
func (s *HTTPServer) ResponseFunc(n int, f ResponseFunc)
ResponseFunc prepares the test server to respond the following n requests using f to build each response.
func (*HTTPServer) ResponseMap ¶
func (s *HTTPServer) ResponseMap(n int, m ResponseMap)
ResponseMap prepares the test server to respond the following n requests using the m to obtain the responses.
func (*HTTPServer) Responses ¶
Responses prepares the test server to respond the following n requests using the provided response parameters.
func (*HTTPServer) ServeHTTP ¶
func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start()
func (*HTTPServer) WaitRequest ¶
func (s *HTTPServer) WaitRequest() *http.Request
WaitRequest returns the next request made to the http server from the queue. If no requests were previously made, it waits until the timeout value for one to be made.
func (*HTTPServer) WaitRequests ¶
func (s *HTTPServer) WaitRequests(n int) []*http.Request
WaitRequests returns the next n requests made to the http server from the queue. If not enough requests were previously made, it waits until the timeout value for them to be made.
type Response ¶
type ResponseFunc ¶
type ResponseMap ¶
ResponseMap maps request paths to responses.
Source Files ¶
- Version
- v0.0.0-20170825154802-2731d20f46f4 (latest)
- Published
- Aug 25, 2017
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 3 days ago –
Tools for package owners.