Documentation
¶
Index ¶
- Constants
- func BootstrapCloudStorage(username, password string) (testcontainers.Container, context.CancelFunc)
- func DefaultGrafanaEnv() map[string]string
- func GetGrafanaVersion() string
- func SetupGrafanaContainer(additionalEnvProps map[string]string, version, imageSuffix string) (testcontainers.Container, func())
- func SetupGrafanaLicense(props *map[string]string) error
Constants ¶
const ( EnterpriseLicenceKey = "GF_ENTERPRISE_LICENSE_TEXT" EnterpriseLicenceKeyEnv = "ENTERPRISE_LICENSE" DefaultCloudUser = "test" DefaultCloudPass = "secretsss" S3UiPort = "9001" )
Variables ¶
This section is empty.
Functions ¶
func BootstrapCloudStorage ¶
func BootstrapCloudStorage(username, password string) (testcontainers.Container, context.CancelFunc)
BootstrapCloudStorage starts a S3 container for cloud storage testing. It accepts optional username and password; defaults are used if empty. Returns the testcontainers.Container and a cancel function to terminate it.
func DefaultGrafanaEnv ¶
func GetGrafanaVersion ¶ added in v0.9.1
func GetGrafanaVersion() string
GetGrafanaVersion returns the Grafana version used for tests. It reads GRAFANA_TEST_VERSION env variable; if unset, defaults to "11.1.4-ubuntu".
func SetupGrafanaContainer ¶
func SetupGrafanaContainer(additionalEnvProps map[string]string, version, imageSuffix string) (testcontainers.Container, func())
SetupGrafanaContainer starts a Grafana test container with default env vars, merges additionalEnvProps, retries up to 3 times, and returns the container and a cancel function to terminate it.
func SetupGrafanaLicense ¶
SetupGrafanaLicense loads the enterprise license from ENTERPRISE_LICENSE env var, stores it under GF_ENTERPRISE_LICENSE_TEXT in props, and errors if not set.
Types ¶
This section is empty.