Documentation ¶
Index ¶
- Variables
- func AccTestsEnabled(envVarName string) bool
- func CheckCloudAPITestsEnabled(t *testing.T)
- func CheckCloudInstanceTestsEnabled(t *testing.T)
- func CheckEnterpriseTestsEnabled(t *testing.T)
- func CheckEnvVarsSet(t *testing.T, envVars ...string)
- func CheckOSSTestsEnabled(t *testing.T)
- func CheckOSSTestsSemver(t *testing.T, semverConstraint string)
- func IsUnitTest(t *testing.T)
- func TestAccExample(t *testing.T, path string) string
- func TestAccExampleWithReplace(t *testing.T, path string, replaceMap map[string]string) string
Constants ¶
This section is empty.
Variables ¶
var ( // ProviderFactories is a static map containing only the main provider instance // It is configured from the main provider package when the test suite is initialized // but it is used in tests of every package ProviderFactories map[string]func() (*schema.Provider, error) // Provider is the "main" provider instance // // This Provider can be used in testing code for API calls without requiring // the use of saving and referencing specific ProviderFactories instances. // // It is configured from the main provider package when the test suite is initialized // but it is used in tests of every package Provider *schema.Provider )
Functions ¶
func AccTestsEnabled ¶
func CheckCloudAPITestsEnabled ¶
CheckCloudTestsEnabled checks if the cloud tests are enabled. This should be the first line of any test that tests Cloud API features
func CheckCloudInstanceTestsEnabled ¶
CheckCloudInstanceTestsEnabled checks if tests that run on cloud instances are enabled. This should be the first line of any test that tests Grafana Cloud Pro features
func CheckEnterpriseTestsEnabled ¶
CheckEnterpriseTestsEnabled checks if the enterprise tests are enabled. This should be the first line of any test that tests Grafana Enterprise features
func CheckEnvVarsSet ¶
func CheckOSSTestsEnabled ¶
CheckOSSTestsEnabled checks if the OSS acceptance tests are enabled. This should be the first line of any test that uses Grafana OSS features only
func CheckOSSTestsSemver ¶
CheckOSSTestsSemver allows to skip tests that are not supported by the Grafana OSS version
func IsUnitTest ¶
func TestAccExample ¶
TestAccExample returns an example config from the examples directory. Examples are used for both documentation and acceptance tests.
Types ¶
This section is empty.