Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type AWSConfig struct {
// IAMRoleARN is the ARN of the IAM role to assume via IRSA (IAM Roles for Service Accounts).
// The test pod will use this role for AWS API authentication.
// The role must have a trust policy that allows the OIDC provider of the cluster
// where the test pod runs.
IAMRoleARN string `json:"iamRoleARN,omitempty"`
// Region is the default AWS region to use for API calls.
// If not set, tests should specify the region when creating AWS clients.
Region string `json:"region,omitempty"`
}
AWSConfig provides AWS-specific configuration for tests that need to interact with AWS APIs
type TestConfig ¶
type TestConfig struct {
AppName string `json:"appName"`
RepoName string `json:"repoName"`
AppCatalog string `json:"appCatalog"`
Providers []string `json:"providers"`
IsMCTest bool `json:"isMCTest"`
// AWS contains AWS-specific configuration for tests that need to interact with AWS APIs.
// This enables IRSA-based authentication for the test pod.
AWS *AWSConfig `json:"aws,omitempty"`
}
TestConfig provides a standard configuration for Apps
func MustLoad ¶
func MustLoad() TestConfig
MustLoad opens the given yaml file and parses it into a TestConfig instance Any errors while opening are silently ignored.
func (*TestConfig) GetAWSIAMRoleARN ¶
func (c *TestConfig) GetAWSIAMRoleARN() string
GetAWSIAMRoleARN returns the configured IAM Role ARN, or empty string if not set
func (*TestConfig) GetAWSRegion ¶
func (c *TestConfig) GetAWSRegion(defaultRegion string) string
GetAWSRegion returns the configured AWS region, or the provided default if not configured
func (*TestConfig) HasAWSConfig ¶
func (c *TestConfig) HasAWSConfig() bool
HasAWSConfig returns true if AWS configuration is present with an IAM Role ARN
Click to show internal directories.
Click to hide internal directories.