tests

package
v6.1.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ApprovedSuffix = ".approved.json"
View Source
const ReceivedSuffix = ".received.json"

Variables

This section is empty.

Functions

func ApproveJson

func ApproveJson(received map[string]interface{}, name string, ignored map[string]string) error

func Compare

func Compare(path string, ignored map[string]string) (map[string]interface{}, []byte, gojsondiff.Diff, error)

func LoadData

func LoadData(file string) ([]byte, error)

func LoadInvalidData

func LoadInvalidData(dataType string) ([]byte, error)

func LoadValidData

func LoadValidData(dataType string) ([]byte, error)

func StrConcat

func StrConcat(pre string, post string, delimiter string) string

func TestDocumentedFieldsInEvent

func TestDocumentedFieldsInEvent(t *testing.T, fieldPaths []string, fn processor.NewProcessor, exceptions *set.Set)

func TestEventAttrsDocumentedInFields

func TestEventAttrsDocumentedInFields(t *testing.T, fieldPaths []string, fn processor.NewProcessor)

func TestJsonSchemaKeywordLimitation

func TestJsonSchemaKeywordLimitation(t *testing.T, fieldPaths []string, schema string, exceptions *set.Set)

func TestPayloadAttributesInSchema

func TestPayloadAttributesInSchema(t *testing.T, name string, undocumentedAttrs *set.Set, schema string)

func TestProcessRequests

func TestProcessRequests(t *testing.T, p processor.Processor, requestInfo []RequestInfo, ignored map[string]string)

func UnmarshalValidData

func UnmarshalValidData(file string, data interface{}) error

Types

type Mapping

type Mapping struct {
	// contains filtered or unexported fields
}

type RequestInfo

type RequestInfo struct {
	Name string
	Path string
}

type Schema

type Schema struct {
	Title                string
	Properties           map[string]*Schema
	AdditionalProperties map[string]interface{}
	PatternProperties    map[string]interface{}
	Items                *Schema
	MaxLength            int
	AllOf                []Schema
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL