Documentation ¶
Index ¶
- Constants
- type InitializationSettings
- 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) ArrangeTest(t *testing.T, ...)
- 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 OctopusContainer ¶
type OctopusContainer struct { testcontainers.Container URI string }
type OctopusContainerTest ¶
type OctopusContainerTest struct { }
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) 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) 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)