Documentation ¶
Index ¶
- Constants
- Variables
- func ControlOutput(ctx context.Context, testName string, options *SubmitTestCmdOptions)
- func DeleteTestCmdCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func DeleteTestCmdFlags(cmd *cobra.Command, options *DeleteTestCmdOptions)
- func FindTimeline(scenario *v1alpha1.Scenario) (from int64, to int64)
- func InspectTestCmdCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func InspectTestCmdFlags(cmd *cobra.Command, options *InspectTestCmdOptions)
- func NewDeleteTestsCmd() *cobra.Command
- func NewGetTestsCmd() *cobra.Command
- func NewInspectTestCmd() *cobra.Command
- func NewReportTestCmd() *cobra.Command
- func NewSaveTestsCmd() *cobra.Command
- func NewSubmitTestCmd() *cobra.Command
- func NewValidateTestCmd() *cobra.Command
- func PopulateSaveTestFlags(cmd *cobra.Command, options *TestSaveOptions)
- func ReportTestCmdCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func ReportTestCmdFlags(cmd *cobra.Command, options *ReportTestCmdOptions)
- func SaveData(ctx context.Context, grafanaClient *grafana.Client, url *grafana.URL, ...) error
- func SavePDF(exporter common.PDFExporter, dashboardURI string, dstFile string) error
- func SavePDFs(ctx context.Context, exporter common.PDFExporter, ...) error
- func SaveTestCmdCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func SubmitTestCmdCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func SubmitTestCmdFlags(cmd *cobra.Command, options *SubmitTestCmdOptions)
- type DeleteTestCmdOptions
- type InspectTestCmdOptions
- type ReportTestCmdOptions
- type SubmitTestCmdOptions
- type TestSaveOptions
Constants ¶
View Source
const ( TestdataSource = "dataviewer:/testdata" PrometheusSource = "prometheus:/prometheus/data" )
View Source
const GraceMonitoringPeriod = 2 * 15 * time.Second
GraceMonitoringPeriod is used to compensate for the misalignment between the termination time of the container, and the next scraping of Prometheus. Normally, it should be twice the scrapping period (which by default is 15s).
View Source
const (
User = "'':''" // Not really needed since we have no authentication in Grafana.
)
Variables ¶
View Source
var DefaultDashboards = []string{"summary", "singleton"}
Functions ¶
func ControlOutput ¶
func ControlOutput(ctx context.Context, testName string, options *SubmitTestCmdOptions)
func DeleteTestCmdCompletion ¶ added in v1.0.37
func DeleteTestCmdFlags ¶ added in v1.0.37
func DeleteTestCmdFlags(cmd *cobra.Command, options *DeleteTestCmdOptions)
func FindTimeline ¶ added in v1.0.32
For the ending time we adhere to these rules: 1. If the scenario is successful, we return the ConditionAllJobsAreCompleted time. 2. If the scenario has failed, we return the Failure time. 3. Otherwise, we report time.Now().
---------------------------------------------------
func InspectTestCmdCompletion ¶ added in v1.0.37
func InspectTestCmdFlags ¶ added in v1.0.37
func InspectTestCmdFlags(cmd *cobra.Command, options *InspectTestCmdOptions)
func NewDeleteTestsCmd ¶
func NewGetTestsCmd ¶
func NewInspectTestCmd ¶
func NewReportTestCmd ¶ added in v1.0.38
func NewSaveTestsCmd ¶
func NewSubmitTestCmd ¶
func NewValidateTestCmd ¶ added in v1.0.38
func PopulateSaveTestFlags ¶
func PopulateSaveTestFlags(cmd *cobra.Command, options *TestSaveOptions)
func ReportTestCmdCompletion ¶ added in v1.0.37
func ReportTestCmdFlags ¶ added in v1.0.37
func ReportTestCmdFlags(cmd *cobra.Command, options *ReportTestCmdOptions)
func SavePDF ¶ added in v1.0.28
func SavePDF(exporter common.PDFExporter, dashboardURI string, dstFile string) error
SavePDF extracts the pdf from Grafana and stores it to the destination.
func SaveTestCmdCompletion ¶ added in v1.0.37
func SubmitTestCmdCompletion ¶ added in v1.0.38
func SubmitTestCmdFlags ¶ added in v1.0.38
func SubmitTestCmdFlags(cmd *cobra.Command, options *SubmitTestCmdOptions)
Types ¶
type DeleteTestCmdOptions ¶ added in v1.0.37
type InspectTestCmdOptions ¶ added in v1.0.37
type ReportTestCmdOptions ¶ added in v1.0.38
type ReportTestCmdOptions struct { // RepositoryCache points to the location where external binaries (i.e, pdf generators) will be stored. RepositoryCache string // Dashboards select the Grafana dashboards that will be downloaded. Dashboards []string // PDF generates one PDf per each panel in the selected dashboard. PDF bool // AggregatePDF generates one PDF for all panels in the selected dashboard. AggregatedPDF bool // Data downloads data from Grafana Data bool // Force starts the reporting regardless of the status of the Scenario (data may be inconsistent). Force bool // Wait blocks until the Scenario is in terminal phase. Wait bool }
type SubmitTestCmdOptions ¶ added in v1.0.38
type TestSaveOptions ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.