terraform-module-test-helper/unittest.go

23 строки
683 B
Go
Исходник Постоянная ссылка Обычный вид История

package terraform_module_test_helper
import (
"testing"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/terraform"
)
var _ testExecutor = unitTestExecutor{}
type unitTestExecutor struct{}
func (u unitTestExecutor) TearDown(t *testing.T, rootDir string, modulePath string) {}
func (u unitTestExecutor) Logger() logger.TestLogger {
return logger.Discard
}
func RunUnitTest(t *testing.T, moduleRootPath, exampleRelativePath string, option terraform.Options, assertion func(*testing.T, TerraformOutput)) {
2023-07-28 08:07:12 +03:00
initAndApplyAndIdempotentTest(t, moduleRootPath, exampleRelativePath, option, true, true, assertion, unitTestExecutor{})
}