Documentation
¶
Index ¶
- type CommandResult
- func (r *CommandResult) AssertFailure(t *testing.T)
- func (r *CommandResult) AssertStderrContains(t *testing.T, substr string)
- func (r *CommandResult) AssertStdoutContains(t *testing.T, substr string)
- func (r *CommandResult) AssertStdoutNotContains(t *testing.T, substr string)
- func (r *CommandResult) AssertSuccess(t *testing.T)
- func (r *CommandResult) GetLines() []string
- func (r *CommandResult) PrintOutput(t *testing.T)
- type TestConfig
- func (c *TestConfig) CreateSubnet(t *testing.T, vpcIdentity string) string
- func (c *TestConfig) CreateVPC(t *testing.T) string
- func (c *TestConfig) GetRegion(t *testing.T) string
- func (c *TestConfig) GetVPC(t *testing.T) string
- func (c *TestConfig) GetVolume(t *testing.T) string
- func (c *TestConfig) RunCommand(t *testing.T, args ...string) *CommandResult
- func (c *TestConfig) SkipIfNotConfigured(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandResult ¶
CommandResult holds the result of a command execution
func (*CommandResult) AssertFailure ¶
func (r *CommandResult) AssertFailure(t *testing.T)
AssertFailure asserts that the command failed
func (*CommandResult) AssertStderrContains ¶
func (r *CommandResult) AssertStderrContains(t *testing.T, substr string)
AssertStderrContains asserts that stderr contains the given string
func (*CommandResult) AssertStdoutContains ¶
func (r *CommandResult) AssertStdoutContains(t *testing.T, substr string)
AssertStdoutContains asserts that stdout contains the given string
func (*CommandResult) AssertStdoutNotContains ¶
func (r *CommandResult) AssertStdoutNotContains(t *testing.T, substr string)
AssertStdoutNotContains asserts that stdout does not contain the given string
func (*CommandResult) AssertSuccess ¶
func (r *CommandResult) AssertSuccess(t *testing.T)
AssertSuccess asserts that the command succeeded
func (*CommandResult) GetLines ¶
func (r *CommandResult) GetLines() []string
GetLines returns stdout split into lines
func (*CommandResult) PrintOutput ¶
func (r *CommandResult) PrintOutput(t *testing.T)
PrintOutput prints the command output for debugging
type TestConfig ¶
type TestConfig struct {
APIEndpoint string
AccessToken string
PersonalAccessToken string
OIDCClientID string
OIDCClientSecret string
Organisation string
BinaryPath string
}
TestConfig holds configuration for E2E tests
func LoadTestConfig ¶
func LoadTestConfig(t *testing.T) *TestConfig
LoadTestConfig loads test configuration from environment variables
func (*TestConfig) CreateSubnet ¶
func (c *TestConfig) CreateSubnet(t *testing.T, vpcIdentity string) string
CreateSubnet creates a subnet in the given VPC for testing and registers cleanup It uses a unique CIDR based on timestamp to avoid conflicts
func (*TestConfig) CreateVPC ¶
func (c *TestConfig) CreateVPC(t *testing.T) string
CreateVPC creates a VPC for testing and registers cleanup
func (*TestConfig) GetRegion ¶
func (c *TestConfig) GetRegion(t *testing.T) string
GetRegion gets a valid region from the API for use in tests
func (*TestConfig) GetVPC ¶
func (c *TestConfig) GetVPC(t *testing.T) string
GetVPC gets a valid VPC from the API for use in tests If no VPC exists, it creates one and registers cleanup
func (*TestConfig) GetVolume ¶
func (c *TestConfig) GetVolume(t *testing.T) string
GetVolume gets a valid volume from the API for use in tests
func (*TestConfig) RunCommand ¶
func (c *TestConfig) RunCommand(t *testing.T, args ...string) *CommandResult
RunCommand executes a CLI command and returns the result
func (*TestConfig) SkipIfNotConfigured ¶
func (c *TestConfig) SkipIfNotConfigured(t *testing.T)
SkipIfNotConfigured skips the test if required configuration is missing