tests

package
v6.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, processorName string) (map[string]interface{}, error)

func LoadDataAsBytes

func LoadDataAsBytes(fileName string) ([]byte, error)

func LoadInvalidData

func LoadInvalidData(processorName string) (map[string]interface{}, error)

func LoadValidData

func LoadValidData(processorName string) (map[string]interface{}, error)

func LoadValidDataAsBytes

func LoadValidDataAsBytes(processorName string) ([]byte, error)

func StrConcat

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

func TestDataAgainstProcessor

func TestDataAgainstProcessor(t *testing.T, p processor.Processor, testData []SchemaTestData)

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)

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
}

type SchemaTestData

type SchemaTestData struct {
	File  string
	Error string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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