package
Version:
v0.0.0-...-32f3f7c
Opens a new window with list of versions in this module.
Published: Jan 5, 2021
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GenerateExample generates example config YAML output.
type Request struct {
Method string `yaml:"method,omitempty"`
Path string `yaml:"path,omitempty"`
Body string `yaml:"body,omitempty"`
}
type Response struct {
Body string `yaml:"body,omitempty"`
Code int `yaml:"code,omitempty"`
}
type TestSpec struct {
Request Request `yaml:"request"`
Response Response `yaml:"response"`
TimeoutSeconds int `yaml:"timeout_seconds"`
SkipValidateBody bool `yaml:"skip_validate_body"`
}
Parse []byte config to TestSpec.
SendRequest sends a request to a server and returns the test response.
Update returns the generated config from the TestSpec.
Validate runs trough the expected response against the actual response and
returns an array with issues.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.