Documentation ¶
Index ¶
- Variables
- type RunOutput
- type TerraformRunner
- func (r *TerraformRunner) Apply() RunOutput
- func (r *TerraformRunner) Close()
- func (r *TerraformRunner) Destroy() RunOutput
- func (r *TerraformRunner) Import(args ...string) RunOutput
- func (r *TerraformRunner) Output() RunOutput
- func (r *TerraformRunner) Resource(typ, name string) interface{}
- func (r *TerraformRunner) Run(args ...string) RunOutput
- func (r *TerraformRunner) Source(text string)
- func (r *TerraformRunner) State() interface{}
- func (r *TerraformRunner) Validate() RunOutput
- type TerraformRunnerBuilder
Constants ¶
This section is empty.
Variables ¶
var ( TestServer *Server Terraform *TerraformRunner TestingT *testing.T )
All tests will use this API TestServer and Terraform runner:
Functions ¶
This section is empty.
Types ¶
type RunOutput ¶
type RunOutput struct { ExitCode int // contains filtered or unexported fields }
func (*RunOutput) VerifyErrorContainsSubstring ¶
type TerraformRunner ¶
type TerraformRunner struct {
// contains filtered or unexported fields
}
TerraformRunner contains the data and logic needed to run Terraform.
func (*TerraformRunner) Apply ¶
func (r *TerraformRunner) Apply() RunOutput
Apply runs the `apply` command.
func (*TerraformRunner) Close ¶
func (r *TerraformRunner) Close()
Close releases all the resources used by the Terraform runner and removes all temporary files and directories.
func (*TerraformRunner) Destroy ¶
func (r *TerraformRunner) Destroy() RunOutput
Destroy runs the `destroy` command.
func (*TerraformRunner) Import ¶
func (r *TerraformRunner) Import(args ...string) RunOutput
Import runs the `import` command.
func (*TerraformRunner) Output ¶
func (r *TerraformRunner) Output() RunOutput
func (*TerraformRunner) Resource ¶
func (r *TerraformRunner) Resource(typ, name string) interface{}
Resource returns the resource stored in the state with the given type and identifier.
func (*TerraformRunner) Run ¶
func (r *TerraformRunner) Run(args ...string) RunOutput
Run runs a command.
func (*TerraformRunner) Source ¶
func (r *TerraformRunner) Source(text string)
Source sets the Terraform source of the test.
func (*TerraformRunner) State ¶
func (r *TerraformRunner) State() interface{}
State returns the reads the Terraform state and returns the result of parsing it as a JSON document.
func (*TerraformRunner) Validate ¶
func (r *TerraformRunner) Validate() RunOutput
Validate runs the `validate` command.
type TerraformRunnerBuilder ¶
type TerraformRunnerBuilder struct {
// contains filtered or unexported fields
}
TerraformRunnerBuilder contains the data and logic needed to build a terraform runner.
func NewTerraformRunner ¶
func NewTerraformRunner() *TerraformRunnerBuilder
NewTerraformRunner creates a new Terraform runner.
func (*TerraformRunnerBuilder) Build ¶
func (b *TerraformRunnerBuilder) Build() *TerraformRunner
Build uses the information stored in the builder to create a new Terraform runner.
func (*TerraformRunnerBuilder) CA ¶
func (b *TerraformRunnerBuilder) CA(value string) *TerraformRunnerBuilder
CA sets the trusted certificates used to connect to the OCM API server.
func (*TerraformRunnerBuilder) Token ¶
func (b *TerraformRunnerBuilder) Token(value string) *TerraformRunnerBuilder
Token sets the authentication token used to connect to the OCM API server.
func (*TerraformRunnerBuilder) URL ¶
func (b *TerraformRunnerBuilder) URL(value string) *TerraformRunnerBuilder
URL sets the URL of the OCM API server.