testinfra

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGrafDir

func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string)

CreateGrafDir creates the Grafana directory.

func SetUpDatabase

func SetUpDatabase(t *testing.T, grafDir string) *sqlstore.SQLStore

SetUpDatabase sets up the Grafana database.

func StartGrafana

func StartGrafana(t *testing.T, grafDir, cfgPath string) (string, *sqlstore.SQLStore)

StartGrafana starts a Grafana server. The server address is returned.

func StartGrafanaEnv

func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.TestEnv)

Types

type GrafanaOpts

type GrafanaOpts struct {
	EnableCSP                             bool
	EnableFeatureToggles                  []string
	NGAlertAdminConfigPollInterval        time.Duration
	NGAlertAlertmanagerConfigPollInterval time.Duration
	AnonymousUserRole                     models.RoleType
	EnableQuota                           bool
	DashboardOrgQuota                     *int64
	DisableAnonymous                      bool
	CatalogAppEnabled                     bool
	ViewersCanEdit                        bool
	PluginAdminEnabled                    bool
	PluginAdminExternalManageEnabled      bool
	AppModeProduction                     bool
	DisableLegacyAlerting                 bool
	EnableUnifiedAlerting                 bool
	UnifiedAlertingDisabledOrgs           []int64
}

Jump to

Keyboard shortcuts

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