Documentation
¶
Index ¶
- Constants
- type InitializationSettings
- type MysqlContainer
- type OctopusContainer
- type OctopusContainerTest
- func (o *OctopusContainerTest) Act(t *testing.T, container *OctopusContainer, terraformBaseDir string, ...) (string, error)
- func (o *OctopusContainerTest) ActWithCustomPrePopulatedSpace(t *testing.T, container *OctopusContainer, initialiseModuleDir string, ...) (string, error)
- func (o *OctopusContainerTest) ActWithCustomSpace(t *testing.T, container *OctopusContainer, initialiseModuleDir string, ...) (string, error)
- func (o *OctopusContainerTest) AddCustomEnvironment(input map[string]string) map[string]string
- func (o *OctopusContainerTest) ArrangeContainer() (*OctopusContainer, *client.Client, *MysqlContainer, testcontainers.Network, ...)
- func (o *OctopusContainerTest) ArrangeTest(t *testing.T, ...)
- func (o *OctopusContainerTest) CleanUp(ctx context.Context, octoContainer *OctopusContainer, ...) error
- func (o *OctopusContainerTest) GetOutputVariable(t *testing.T, terraformDir string, outputVar string) (string, error)
- func (o *OctopusContainerTest) InitialiseOctopus(t *testing.T, container *OctopusContainer, terraformInitModuleDir string, ...) error
- func (o *OctopusContainerTest) ShowState(t *testing.T, terraformDir string) error
- func (o *OctopusContainerTest) TerraformApply(t *testing.T, terraformProjectDir string, server string, spaceId string, ...) error
- func (o *OctopusContainerTest) TerraformInit(t *testing.T, terraformProjectDir string) error
- func (o *OctopusContainerTest) TerraformInitAndApply(t *testing.T, container *OctopusContainer, terraformProjectDir string, ...) error
- type TestLogConsumer
Constants ¶
const ApiKey = "API-ABCDEFGHIJKLMNOPQURTUVWXYZ12345"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitializationSettings ¶
type MysqlContainer ¶
type MysqlContainer struct { testcontainers.Container // contains filtered or unexported fields }
type OctopusContainer ¶
type OctopusContainer struct { testcontainers.Container URI string }
type OctopusContainerTest ¶
func (*OctopusContainerTest) Act ¶
func (o *OctopusContainerTest) Act(t *testing.T, container *OctopusContainer, terraformBaseDir string, terraformModuleDir string, populateVars []string) (string, error)
Act initialises Octopus and MSSQL
func (*OctopusContainerTest) ActWithCustomPrePopulatedSpace ¶
func (o *OctopusContainerTest) ActWithCustomPrePopulatedSpace(t *testing.T, container *OctopusContainer, initialiseModuleDir string, prepopulateModuleDir string, terraformModuleDir string, initialiseVars []string, prePopulateVars []string, populateVars []string) (string, error)
ActWithCustomPrePopulatedSpace initialises Octopus and MSSQL with a custom directory holding the module to create the initial space and a module used to prepopulate the space
func (*OctopusContainerTest) ActWithCustomSpace ¶
func (o *OctopusContainerTest) ActWithCustomSpace(t *testing.T, container *OctopusContainer, initialiseModuleDir string, terraformModuleDir string, initialiseVars []string, populateVars []string) (string, error)
ActWithCustomSpace initialises Octopus and MSSQL with a custom directory holding the module to create the initial space
func (*OctopusContainerTest) AddCustomEnvironment ¶
func (o *OctopusContainerTest) AddCustomEnvironment(input map[string]string) map[string]string
Pass through feature flags in the current environment to the environment used to launch the OctopusDeploy container
func (*OctopusContainerTest) ArrangeContainer ¶
func (o *OctopusContainerTest) ArrangeContainer() (*OctopusContainer, *client.Client, *MysqlContainer, testcontainers.Network, error)
ArrangeContainer is wrapper that initialises Octopus, and returns the container for future test runs
func (*OctopusContainerTest) ArrangeTest ¶
func (o *OctopusContainerTest) ArrangeTest(t *testing.T, testFunc func(t *testing.T, container *OctopusContainer, client *client.Client) error)
ArrangeTest is wrapper that initialises Octopus, runs a test, and cleans up the containers
func (*OctopusContainerTest) CleanUp ¶
func (o *OctopusContainerTest) CleanUp(ctx context.Context, octoContainer *OctopusContainer, sqlServer *MysqlContainer, network testcontainers.Network) error
CleanUp stops the containers after the test is complete
func (*OctopusContainerTest) GetOutputVariable ¶
func (o *OctopusContainerTest) GetOutputVariable(t *testing.T, terraformDir string, outputVar string) (string, error)
GetOutputVariable reads a Terraform output variable
func (*OctopusContainerTest) InitialiseOctopus ¶
func (o *OctopusContainerTest) InitialiseOctopus( t *testing.T, container *OctopusContainer, terraformInitModuleDir string, prepopulateModuleDir string, terraformModuleDir string, spaceName string, initialiseVars []string, prepopulateVars []string, populateVars []string) error
InitialiseOctopus uses Terraform to populate the test Octopus instance, making sure to clean up any files generated during previous Terraform executions to avoid conflicts and locking issues.
func (*OctopusContainerTest) ShowState ¶
func (o *OctopusContainerTest) ShowState(t *testing.T, terraformDir string) error
ShowState reads the terraform state
func (*OctopusContainerTest) TerraformApply ¶
func (o *OctopusContainerTest) TerraformApply(t *testing.T, terraformProjectDir string, server string, spaceId string, vars []string) error
TerraformApply runs "terraform apply"
func (*OctopusContainerTest) TerraformInit ¶
func (o *OctopusContainerTest) TerraformInit(t *testing.T, terraformProjectDir string) error
TerraformInit runs "terraform init"
func (*OctopusContainerTest) TerraformInitAndApply ¶
func (o *OctopusContainerTest) TerraformInitAndApply(t *testing.T, container *OctopusContainer, terraformProjectDir string, spaceId string, vars []string) error
TerraformInitAndApply calls terraform init and apply on the supplied directory.
type TestLogConsumer ¶
type TestLogConsumer struct { }
func (*TestLogConsumer) Accept ¶
func (g *TestLogConsumer) Accept(l testcontainers.Log)