testinfra

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 26 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. The log by default is muted in the regression test, to activate it, pass option EnableLog = true

func CreateUser

func CreateUser(t *testing.T, store *sqlstore.SQLStore, cmd user.CreateUserCommand) *user.User

func SQLiteIntegrationTest

func SQLiteIntegrationTest(t *testing.T)

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                     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
}

Jump to

Keyboard shortcuts

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