Documentation ¶
Index ¶
- func Chdir(t *testing.T, targetDir string) func()
- func EnsureEmptyPluginFolder(t *testing.T) (string, func())
- func EnsureEmptyTerraformFolder(t *testing.T, projectPath string)
- func GetTerraform(t *testing.T, version string, rootDir string) string
- func GetTerraspec(t *testing.T, rootDir string) string
- func Getwd(t *testing.T) string
- func InstallLegacyProvider(t *testing.T, terraformVersion string) (addrs.Provider, string, string)
- func ParseTerraformVersion(t *testing.T, version string) (int64, int64, int64)
- func RunTerraspec(t *testing.T, terraspecPath string, projectPath string) (int, string, error)
- func TerraformInit(t *testing.T, terraformPath string, projectPath string) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureEmptyPluginFolder ¶
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 ¶
EnsureEmptyTerraformFolder deletes the .terraform folder inside config directory
func GetTerraform ¶
GetTerraform downloads terraform with the stated version into the root project directory.
func GetTerraspec ¶
GetTerraspec computes the path of the terraspec executable. If it cannot be found it is build.
func InstallLegacyProvider ¶
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 ¶
ParseTerraformVersion parses the given version string and returns major, minor and patch version.
func RunTerraspec ¶
RunTerraspec runs the given terraspec executable in the specified project path.
Types ¶
This section is empty.