Documentation ¶
Index ¶
- func BuildCli()
- func CreateMockServer(t *testing.T, mappingPaths []string) *httptest.Server
- func CreateMockServerFromDir(t *testing.T, d string) *httptest.Server
- func RunCommandTestCase(t *testing.T, ts *httptest.Server, ctx *gosnap.Context, tc *CommandTestCase)
- func RunCommandTestCases(t *testing.T, mappingDir string, testCases []*CommandTestCase)
- type CommandTestCase
- type Mapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockServerFromDir ¶
func RunCommandTestCase ¶
func RunCommandTestCases ¶
func RunCommandTestCases(t *testing.T, mappingDir string, testCases []*CommandTestCase)
Types ¶
type CommandTestCase ¶
type Mapping ¶
type Mapping struct { Request struct { Method string `json:"method"` Path string `json:"path"` Query map[string]string `json:"query"` } `json:"request"` Response struct { Status int `json:"status"` BodyFileName string `json:"bodyFileName"` BodyContent string `json:"bodyContent"` Headers map[string]string `json:"headers"` } `json:"response"` }
Click to show internal directories.
Click to hide internal directories.