integrationtests

package
v0.0.0-...-f01a3cb Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chdir

func Chdir(t *testing.T, targetDir string) func()

func EnsureEmptyPluginFolder

func EnsureEmptyPluginFolder(t *testing.T) (string, func())

EnsureEmptyPluginFolder ensures that there is an empty plugin folder in the home dir. It backups the original folder. You can restore it with the returned func. It also returns the path to the plugin folder.

func EnsureEmptyTerraformFolder

func EnsureEmptyTerraformFolder(t *testing.T, projectPath string)

EnsureEmptyTerraformFolder deletes the .terraform folder inside config directory

func GetTerraform

func GetTerraform(t *testing.T, version string, rootDir string) string

GetTerraform downloads terraform with the stated version into the root project directory.

func GetTerraspec

func GetTerraspec(t *testing.T, rootDir string) string

GetTerraspec computes the path of the terraspec executable. If it cannot be found it is build.

func Getwd

func Getwd(t *testing.T) string

func InstallLegacyProvider

func InstallLegacyProvider(t *testing.T, terraformVersion string) (addrs.Provider, string, string)

InstallLegacyProvider installs a legacy provider. Currently the installed provider is the one for cloudfoundry. You should first use ensureEmptyPluginFolder to avoid damaging the local plugin folder. Returns the addrs.Provider with hostname, namespace, and name, as well as the version of the provider, and the full path to the file.

func ParseTerraformVersion

func ParseTerraformVersion(t *testing.T, version string) (int64, int64, int64)

ParseTerraformVersion parses the given version string and returns major, minor and patch version.

func RunTerraspec

func RunTerraspec(t *testing.T, terraspecPath string, projectPath string) (int, string, error)

RunTerraspec runs the given terraspec executable in the specified project path.

func TerraformInit

func TerraformInit(t *testing.T, terraformPath string, projectPath string) func()

TerraformInit switches to and initializes the terraform project in the given path. Returns a function to cleanup the terraform folder and switch back to current path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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