Documentation
¶
Index ¶
- func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string)
- func CreateUser(t *testing.T, store db.DB, cfg *setting.Cfg, cmd user.CreateUserCommand) *user.User
- func SQLiteIntegrationTest(t *testing.T)
- func StartGrafana(t *testing.T, grafDir, cfgPath string) (string, db.DB)
- func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.TestEnv)
- type GrafanaOpts
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. The log by default is muted in the regression test, to activate it, pass option EnableLog = true
func CreateUser ¶
func SQLiteIntegrationTest ¶
func StartGrafana ¶
StartGrafana starts a Grafana server. The server address is returned.
Types ¶
type GrafanaOpts ¶
type GrafanaOpts struct { EnableCSP bool EnableFeatureToggles []string NGAlertAdminConfigPollInterval time.Duration NGAlertAlertmanagerConfigPollInterval time.Duration NGAlertSchedulerBaseInterval time.Duration AnonymousUserRole org.RoleType EnableQuota bool DashboardOrgQuota *int64 DisableAnonymous bool CatalogAppEnabled bool ViewersCanEdit bool PluginAdminEnabled bool PluginAdminExternalManageEnabled bool AppModeProduction bool DisableLegacyAlerting bool EnableUnifiedAlerting bool UnifiedAlertingDisabledOrgs []int64 EnableLog bool GRPCServerAddress string QueryRetries int64 APIServerStorageType string GrafanaComAPIURL string DualWriterDesiredModes map[string]grafanarest.DualWriterMode }
Click to show internal directories.
Click to hide internal directories.