Documentation ¶
Index ¶
- Constants
- func ExposeIngress(t *testing.T, ctx context.Context, client *k8s.Clientset, config *rest.Config, ...)
- func ExposePod(t *testing.T, ctx context.Context, client *k8s.Clientset, config *rest.Config, ...)
- func GenerateS3BucketName() string
- func GetAWSAccountId() string
- func GetAWSRegion() string
- func GetBicepRecipeRegistry() string
- func GetBicepRecipeVersion() string
- func GetCreationTimestamp() string
- func GetHTTPProxyList(ctx context.Context, client runtime_client.Client, ...) (*contourv1.HTTPProxyList, error)
- func GetMagpieImage() string
- func GetMagpieTag() string
- func GetOIDCIssuer() string
- func GetTerraformRecipeModuleServerURL() string
- func IsMapNonIntersecting(notExpectedMap map[string]string, actualMap map[string]string) bool
- func IsMapSubSet(expectedMap map[string]string, actualMap map[string]string) bool
- func NewTestLogger(t *testing.T) *log.Logger
- func SetDefault() (string, string)
- func WriteBicepParameterFile(t *testing.T, data map[string]any) string
- type ProxyMetadata
- type TestWriter
Constants ¶
const (
RadiusSystemNamespace = "radius-system"
)
Variables ¶
This section is empty.
Functions ¶
func ExposeIngress ¶
func ExposeIngress(t *testing.T, ctx context.Context, client *k8s.Clientset, config *rest.Config, remotePort int, stopChan chan struct{}, portChan chan int, errorChan chan error)
ExposeIngress creates a port-forward session and sends the (assigned) local port to portChan. It exposes a pod in the RadiusSystemNamespace with the selector "app.kubernetes.io/component=envoy" on the given remotePort and returns the port number and an error if any.
func ExposePod ¶
func ExposePod(t *testing.T, ctx context.Context, client *k8s.Clientset, config *rest.Config, namespace string, selector string, remotePort int, stopChan chan struct{}, portChan chan int, errorChan chan error)
ExposePod creates a port-forward session. It finds a pod matching the given selector, creates an API Server URL, sets up a port-forwarder, and sends the assigned port to the portChan channel.
func GenerateS3BucketName ¶ added in v0.26.0
func GenerateS3BucketName() string
GenerateS3BucketName generates a unique S3 bucket name.
func GetAWSAccountId ¶
func GetAWSAccountId() string
GetAWSAccountId retrieves the AWS Account ID from the environment and returns it as a string.
func GetAWSRegion ¶
func GetAWSRegion() string
GetAWSRegion returns the AWS region from the environment variable "AWS_REGION".
func GetBicepRecipeRegistry ¶
func GetBicepRecipeRegistry() string
GetBicepRecipeRegistry returns the default recipe registry if one is not set in the environment.
func GetBicepRecipeVersion ¶
func GetBicepRecipeVersion() string
GetBicepRecipeVersion returns the version of the Bicep recipe to be used, either from the environment variable or the default value "latest".
func GetCreationTimestamp ¶ added in v0.26.0
func GetCreationTimestamp() string
GetCreationTimestamp returns the elapsed time since the Unix epoch in seconds.
func GetHTTPProxyList ¶
func GetHTTPProxyList(ctx context.Context, client runtime_client.Client, namespace, application string) (*contourv1.HTTPProxyList, error)
GetHTTPProxyList returns a list of HTTPProxies for the specified application. It returns an error if the list cannot be retrieved.
func GetMagpieImage ¶
func GetMagpieImage() string
GetMagpieImage creates a string with the default Docker registry and image tag for MagpieGo.
func GetMagpieTag ¶
func GetMagpieTag() string
GetMagpieTag sets a default image tag and returns a string with the format "magpietag=<imageTag>"
func GetOIDCIssuer ¶
func GetOIDCIssuer() string
GetOIDCIssuer gets the OIDC Issuer URI from the environment variable FUNCTEST_OIDC_ISSUER or a default value if the environment variable is empty.
func GetTerraformRecipeModuleServerURL ¶
func GetTerraformRecipeModuleServerURL() string
GetTerraformRecipeModuleServerURL gets the terraform module server to use in tests from the environment variable TF_RECIPE_MODULE_SERVER_URL. If the environment variable is not set, it uses the default value for local testing (http://localhost:8999).
The data is returned in bicep parameter format using the parameter name 'moduleServer'. The return value of this function can be used as a parameter to 'rad deploy'.
Example:
moduleServer=http://localhost:8999.
func IsMapNonIntersecting ¶
IsMapNonIntersecting returns true if the notExpectedMap and actualMap do not have any keys in common
func IsMapSubSet ¶
IsMapSubSet returns true if the expectedMap is a subset of the actualMap
func NewTestLogger ¶
NewTestLogger creates a new logger that writes to the testing.T object.
func SetDefault ¶
SetDefault sets the default Docker registry and image tag if they are not already set in the environment.
Types ¶
type ProxyMetadata ¶
func GetHTTPProxyMetadata ¶
func GetHTTPProxyMetadata(ctx context.Context, client runtime_client.Client, namespace, application string) (*ProxyMetadata, error)
GetHTTPProxyMetadata finds the fqdn set on the root HTTPProxy of the specified application and the current status (e.g. "Valid", "Invalid"). It returns an error if the root proxy is not found.
type TestWriter ¶
type TestWriter struct {
// contains filtered or unexported fields
}