tests

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	User = "'':''" // Not really needed since we have no authentication in Grafana.

	SummaryDashboardUID = "summary"
)
View Source
const (
	TestdataSource   = "dataviewer:/testdata"
	PrometheusSource = "prometheus:/prometheus/data"
)

Variables

View Source
var (
	// FastPDFExporter is fast on individual panels, but does not render dashboard with many panels.
	FastPDFExporter string

	// LongPDFExporter can render dashboards with many panels, but it's a bit slow.
	LongPDFExporter string
)

Functions

func ControlOutput

func ControlOutput(testName string, options *TestSubmitOptions)

func GenerateQuotedURL added in v1.0.28

func GenerateQuotedURL(grafanaEndpoint string, dashboard string, from int64, to int64) string

func InstallPDFExporter added in v1.0.28

func InstallPDFExporter(location string)

func NewDeleteTestsCmd

func NewDeleteTestsCmd() *cobra.Command

func NewGetTestsCmd

func NewGetTestsCmd() *cobra.Command

func NewInspectTestCmd

func NewInspectTestCmd() *cobra.Command

func NewReportTestsCmd added in v1.0.28

func NewReportTestsCmd() *cobra.Command

func NewSaveTestsCmd

func NewSaveTestsCmd() *cobra.Command

func NewSubmitTestCmd

func NewSubmitTestCmd() *cobra.Command

func PopulateInspectFlags

func PopulateInspectFlags(cmd *cobra.Command, options *InspectOptions)

func PopulateReportTestFlags added in v1.0.28

func PopulateReportTestFlags(cmd *cobra.Command, options *TestReportOptions)

func PopulateSaveTestFlags

func PopulateSaveTestFlags(cmd *cobra.Command, options *TestSaveOptions)

func PopulateTestDeleteFlags

func PopulateTestDeleteFlags(cmd *cobra.Command, options *TestDeleteOptions)

func PopulateTestSubmitFlags

func PopulateTestSubmitFlags(cmd *cobra.Command, options *TestSubmitOptions)

func SavePDF added in v1.0.28

func SavePDF(options *TestReportOptions, dashboardURI string, destination string) error

SavePDF extracts the pdf from Grafana and stores it to the destinatio.

func SavePDFs added in v1.0.28

func SavePDFs(options *TestReportOptions, dashboardURI, destDir string, grafanaEndpoint string, dashboardUID string) error

Types

type InspectOptions

type InspectOptions struct {
	Overview, Events, ExternalResources, Charts bool
	All                                         bool
	Shell                                       string

	Logs     []string
	Loglines int
}

type TestDeleteOptions

type TestDeleteOptions struct {
	DeleteAll, Force bool
	Selectors        []string
}

type TestReportOptions added in v1.0.28

type TestReportOptions struct {
	Force, Aggregate bool
	DashboardUID     string
	RepositoryCache  string
}

type TestSaveOptions

type TestSaveOptions struct {
	Force      bool
	Datasource string
}

type TestSubmitOptions

type TestSubmitOptions struct {
	CPUQuota, MemoryQuota                     string
	Watch                                     bool
	ExpectSuccess, ExpectFailure, ExpectError bool
	Timeout                                   string

	Logs     []string
	Loglines int
}

Jump to

Keyboard shortcuts

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