Documentation
¶
Overview ¶
Package utils provides utility functions and helpers for use within the terratest-utils library.
This package contains reusable utilities for interacting with Kubernetes clusters, handling REST client configurations, and other common operations needed in testing and automation scenarios. The functions in this package are designed to be used internally by other packages in terratest-utils, as well as directly by tests that require advanced or custom behaviors.
Example utilities include:
- Retrieving and configuring Kubernetes REST clients based on various options.
- Helper functions for working with test contexts and logging.
- Common error handling and assertion helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRestConfigE ¶
GetRestConfigE retrieves a Kubernetes REST client configuration based on the provided KubectlOptions. If the RestConfig field in options is already set, it returns that configuration directly. Otherwise, it attempts to load the configuration from the kubeconfig file path specified in options, using the provided context name. Returns the REST config or an error if loading fails.
Parameters:
- t: The testing context, used for logging and helper tracking.
- options: The KubectlOptions containing configuration and context information.
Returns:
- *rest.Config: The Kubernetes REST client configuration.
- error: An error if the configuration could not be loaded.
Types ¶
This section is empty.