report

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestReportDirName     = "ArmstrongReport"
	TraceLogDirName       = "traces"
	ApiTestReportFileName = "SwaggerAccuracyReport"
	ApiTestConfigFileName = "ApiTestConfig.json"
)

Variables

This section is empty.

Functions

func AllRequestTracesContent

func AllRequestTracesContent(id string, logs []paltypes.RequestTrace) string

func CleanupAllRequestTracesContent

func CleanupAllRequestTracesContent(id string, logs []paltypes.RequestTrace) string

func CleanupErrorMarkdownReport

func CleanupErrorMarkdownReport(report types.Error, logs []paltypes.RequestTrace) string

func CleanupMarkdownReport

func CleanupMarkdownReport(passReport types.PassReport) string

func DiffMarkdownReport

func DiffMarkdownReport(report types.Diff, logs []paltypes.RequestTrace) string

func DiffMessageDescription

func DiffMessageDescription(diff types.Change) string

func DiffMessageMarkdown

func DiffMessageMarkdown(diff types.Change) string

func DiffMessageReadable

func DiffMessageReadable(diff types.Change) string

func DiffMessageTerraform

func DiffMessageTerraform(diff types.Change) string

func ErrorMarkdownReport

func ErrorMarkdownReport(report types.Error, logs []paltypes.RequestTrace) string

func GenerateApiTestReports

func GenerateApiTestReports(wd string, swaggerPath string) error

func HttpRequestToString

func HttpRequestToString(r *paltypes.HttpRequest) string

func HttpResponseToString

func HttpResponseToString(r *paltypes.HttpResponse) string

func IsUrlMatchWithId

func IsUrlMatchWithId(url string, id string) bool

func PassedMarkdownReport

func PassedMarkdownReport(passReport types.PassReport, coverageReport coverage.CoverageReport) string

func RequestTraceToString

func RequestTraceToString(r paltypes.RequestTrace) string

func RequestTracesContent

func RequestTracesContent(id string, logs []paltypes.RequestTrace) string

Types

type ApiTestConfig

type ApiTestConfig struct {
	SuppressionList []Suppression `json:"suppressionList"`
}

type ApiTestReport

type ApiTestReport struct {
	CoveredSpecFiles        []string              `json:"coveredSpecFiles"`
	UnCoveredOperationsList []UnCoveredOperations `json:"unCoveredOperationsList"`
	Errors                  []ErrorItem           `json:"errors"`
}

func OavValidateTraffic

func OavValidateTraffic(traceDir string, swaggerPath string, outputDir string) (*ApiTestReport, error)

type ErrorItem

type ErrorItem struct {
	Spec                   string `json:"spec"`
	ErrorCode              string `json:"errorCode"`
	ErrorLink              string `json:"errorLink"`
	ErrorMessage           string `json:"errorMessage"`
	OperationId            string `json:"operationId"`
	SchemaPathWithPosition string `json:"schemaPathWithPosition"`
}

type Suppression

type Suppression struct {
	Code      string `json:"rule"`
	File      string `json:"file"`
	Operation string `json:"operation"`
	Reason    string `json:"reason"`
}

type UnCoveredOperations

type UnCoveredOperations struct {
	Spec         string   `json:"spec"`
	OperationIds []string `json:"operationIds"`
}

Jump to

Keyboard shortcuts

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