Documentation ¶
Overview ¶
Package testdb provides functionality for working with test databases.
Index ¶
- func AddHTTPBodyToMap(body string, m map[string][]string) error
- func ContainsMatchingURL(urlMethods []string, urlStr string, requestURL string, ...) (bool, error)
- func Decode(yamlTestcase *yaml.NetworkTrafficDoc, logger *zap.Logger) (*models.TestCase, error)
- func EncodeTestcase(tc models.TestCase, logger *zap.Logger) (*yaml.NetworkTrafficDoc, error)
- func FindNoisyFields(m map[string][]string, comparator func(string, []string) bool) []string
- func Flatten(j interface{}) map[string][]string
- func FlattenHTTPResponse(h http.Header, body string) (map[string][]string, error)
- func HasBannedHeaders(object map[string]string, bannedHeaders map[string]string) (bool, error)
- type TestYaml
- func (ts *TestYaml) ChangePath(path string)
- func (ts *TestYaml) DeleteTestSet(ctx context.Context, testSetID string) error
- func (ts *TestYaml) DeleteTests(ctx context.Context, testSetID string, testCaseIDs []string) error
- func (ts *TestYaml) GetAllTestSetIDs(ctx context.Context) ([]string, error)
- func (ts *TestYaml) GetTestCases(ctx context.Context, testSetID string) ([]*models.TestCase, error)
- func (ts *TestYaml) InsertTestCase(ctx context.Context, tc *models.TestCase, testSetID string) error
- func (ts *TestYaml) UpdateTestCase(ctx context.Context, tc *models.TestCase, testSetID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsMatchingURL ¶
func EncodeTestcase ¶
func FindNoisyFields ¶
func Flatten ¶
Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys. examples of valid jsons - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#examples
func FlattenHTTPResponse ¶
Types ¶
type TestYaml ¶
type TestYaml struct { TcsPath string // contains filtered or unexported fields }
func (*TestYaml) ChangePath ¶
func (*TestYaml) DeleteTestSet ¶
func (*TestYaml) DeleteTests ¶
func (*TestYaml) GetAllTestSetIDs ¶
func (*TestYaml) GetTestCases ¶
func (*TestYaml) InsertTestCase ¶
Click to show internal directories.
Click to hide internal directories.