framework

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (ro *RunOutput) VerifyErrorContainsSubstring(sub string)

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

Build uses the information stored in the builder to create a new Terraform runner.

func (*TerraformRunnerBuilder) CA

CA sets the trusted certificates used to connect to the OCM API server.

func (*TerraformRunnerBuilder) Token

Token sets the authentication token used to connect to the OCM API server.

func (*TerraformRunnerBuilder) URL

URL sets the URL of the OCM API server.

Jump to

Keyboard shortcuts

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