config

package
v3.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig added in v3.1.0

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 added in v3.1.0

func (c *TestConfig) GetAWSIAMRoleARN() string

GetAWSIAMRoleARN returns the configured IAM Role ARN, or empty string if not set

func (*TestConfig) GetAWSRegion added in v3.1.0

func (c *TestConfig) GetAWSRegion(defaultRegion string) string

GetAWSRegion returns the configured AWS region, or the provided default if not configured

func (*TestConfig) HasAWSConfig added in v3.1.0

func (c *TestConfig) HasAWSConfig() bool

HasAWSConfig returns true if AWS configuration is present with an IAM Role ARN

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL