Discover Packages
github.com/yama-koo/go-json-e2e-test
e2e
package
Version:
v0.1.2
Opens a new window with list of versions in this module.
Published: Nov 16, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
A simple library for server-level e2e testing in json
E2E searches recursively for req*.json in the folder you specify by path.
Make a request to api using the found json and compare the response to the res*.json of the same name.
type Request struct {
Method string `json:"method"`
Path string `json:"path"`
Data interface{} `json:"data"`
}
Request is the format of the `req.json`
type Response struct {
Message string `json:"message"`
StatusCode int `json:"statusCode"`
Data interface{} `json:"data"`
}
Response is the format of the `req.json`
Source Files
¶
Click to show internal directories.
Click to hide internal directories.