Documentation ¶
Index ¶
- func NoResourceAttributesSet(res string, attrs []string) resource.TestCheckFunc
- func ResourceAttributes(res string, attrs map[string]string) resource.TestCheckFunc
- func ResourceAttributesSet(res string, attrs []string) resource.TestCheckFunc
- type Environment
- func (e *Environment) AccessClient() *access.Client
- func (e *Environment) AddTemplateVars(vars map[string]any)
- func (e *Environment) Client() api.Client
- func (e *Environment) ClusterClient() *cluster.Client
- func (e *Environment) NodeClient() *nodes.Client
- func (e *Environment) NodeStorageClient() *storage.Client
- func (e *Environment) RenderConfig(cfg string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoResourceAttributesSet ¶
func NoResourceAttributesSet(res string, attrs []string) resource.TestCheckFunc
NoResourceAttributesSet is a helper function to test that no resource attributes are set.
func ResourceAttributes ¶
func ResourceAttributes(res string, attrs map[string]string) resource.TestCheckFunc
ResourceAttributes is a helper function to test resource attributes.
func ResourceAttributesSet ¶
func ResourceAttributesSet(res string, attrs []string) resource.TestCheckFunc
ResourceAttributesSet is a helper function to test that all resource attributes are set.
Types ¶
type Environment ¶
type Environment struct { NodeName string DatastoreID string AccProviders map[string]func() (tfprotov6.ProviderServer, error) CloudImagesServer string ContainerImagesServer string // contains filtered or unexported fields }
Environment is a test environment for acceptance tests.
func InitEnvironment ¶
func InitEnvironment(t *testing.T) *Environment
InitEnvironment initializes a new test environment for acceptance tests.
func (*Environment) AccessClient ¶
func (e *Environment) AccessClient() *access.Client
AccessClient returns a new access client for the test environment.
func (*Environment) AddTemplateVars ¶
func (e *Environment) AddTemplateVars(vars map[string]any)
AddTemplateVars adds the given variables to the template variables of the current test environment. Please note that NodeName and ProviderConfig are reserved keys, they are set by the test environment and cannot be overridden.
func (*Environment) Client ¶
func (e *Environment) Client() api.Client
Client returns a new API client for the test environment.
func (*Environment) ClusterClient ¶ added in v0.66.1
func (e *Environment) ClusterClient() *cluster.Client
ClusterClient returns a new cluster client for the test environment.
func (*Environment) NodeClient ¶
func (e *Environment) NodeClient() *nodes.Client
NodeClient returns a new nodes client for the test environment.
func (*Environment) NodeStorageClient ¶
func (e *Environment) NodeStorageClient() *storage.Client
NodeStorageClient returns a new storage client for the test environment.
func (*Environment) RenderConfig ¶
func (e *Environment) RenderConfig(cfg string) string
RenderConfig renders the given configuration with for the current test environment using template engine.