Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxMockNum = 100 MaxPollNum = 100 FakeTokenID = "0123456789abcdef01234567890abcdef" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct { Request RequestDetail `yaml:"request"` Response ResponseDetail `yaml:"response"` ExpectedStatus []string `yaml:"expectedStatus"` NewStatus string `yaml:"newStatus"` Counter PollingCondition `yaml:"counter"` Tracker *Tracker }
type MockController ¶
type MockController struct { Mocks map[string][]Mock //key should be API path Trackers map[string]*Tracker Mux *http.ServeMux Server *httptest.Server }
func NewMockController ¶
func NewMockController() *MockController
func (MockController) Endpoint ¶
func (mc MockController) Endpoint() string
func (MockController) StartServer ¶
func (mc MockController) StartServer(t *testing.T)
func (*MockController) TerminateMockControllerSafety ¶
func (mc *MockController) TerminateMockControllerSafety()
type PollingCondition ¶
Polling Condition is used for status transition, e.g. PENDING_CREATE to ACTIVE
type RequestDetail ¶
type ResponseDetail ¶
Click to show internal directories.
Click to hide internal directories.