generictt

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Generic utility that runs the terratest (tt), so that various test cases in this entire repository would behave similarly with minimal code duplication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOutputsCorrect

func CheckOutputsCorrect(t *testing.T, terraformOptions *terraform.Options)

CheckOutputsCorrect verifies whether none of the terraform outputs returns "false". The comparison is case insensitive. Only scalar values are checked, a list containing "false" is allowed, as is an empty list.

func GenericTest

func GenericTest(t *testing.T, terraformOptions *terraform.Options, checkFunc CheckFunc) *terraform.Options

GenericTest runs the Terratest with generic settings. The outputs of the Terraform need to pass both checkFunc and the standard CheckOutputsCorrect function.

Types

type CheckFunc

type CheckFunc func(t *testing.T, terraformOptions *terraform.Options)

CheckFunc is a function that can be run on an applied Terraform test-case as given by t. The terraformOptions should be the same which were used to apply t. The function should either exit cleanly, or invoke t.Errorf() which fails the entire test-case in a usual way.

Jump to

Keyboard shortcuts

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