Skip to main content
Testing utilities for cdktf applications.

Initializers

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.NewTesting() Testing
NameTypeDescription

Static Functions

NameDescription
AppReturns an app for testing with the following properties: - Output directory is a temp dir.
EnableFutureFlagsNo description.
FakeCdktfJsonPathNo description.
FullSynthNo description.
RenderConstructTreeNo description.
SetupJestNo description.
StubVersionNo description.
SynthReturns the Terraform synthesized JSON.
SynthHclReturns the Terraform synthesized JSON.
SynthScopeNo description.
ToBeValidTerraformNo description.
ToHaveDataSourceNo description.
ToHaveDataSourceWithPropertiesNo description.
ToHaveProviderNo description.
ToHaveProviderWithPropertiesNo description.
ToHaveResourceNo description.
ToHaveResourceWithPropertiesNo description.

App

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_App(options TestingAppConfig) App
Returns an app for testing with the following properties: - Output directory is a temp dir.

optionsOptional


EnableFutureFlags

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_EnableFutureFlags(app App) App

appRequired


FakeCdktfJsonPath

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_FakeCdktfJsonPath(app App) App

appRequired


FullSynth

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_FullSynth(stack TerraformStack) *string

stackRequired


RenderConstructTree

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_RenderConstructTree(construct IConstruct) *string

constructRequired

  • Type: github.com/aws/constructs-go/constructs/v10.IConstruct

SetupJest

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_SetupJest()

StubVersion

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_StubVersion(app App) App

appRequired


Synth

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_Synth(stack TerraformStack, runValidations *bool) *string
Returns the Terraform synthesized JSON.

stackRequired


runValidationsOptional

  • Type: *bool

SynthHcl

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_SynthHcl(stack TerraformStack, runValidations *bool, returnMetadata *bool) interface{}
Returns the Terraform synthesized JSON.

stackRequired


runValidationsOptional

  • Type: *bool

returnMetadataOptional

  • Type: *bool

SynthScope

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_SynthScope(fn IScopeCallback) *string

fnRequired


ToBeValidTerraform

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToBeValidTerraform(received *string) *bool

receivedRequired

  • Type: *string

ToHaveDataSource

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveDataSource(received *string, resourceType *string) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

ToHaveDataSourceWithProperties

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveDataSourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

propertiesOptional

  • Type: *map[string]interface{}

ToHaveProvider

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveProvider(received *string, resourceType *string) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

ToHaveProviderWithProperties

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveProviderWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

propertiesOptional

  • Type: *map[string]interface{}

ToHaveResource

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveResource(received *string, resourceType *string) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

ToHaveResourceWithProperties

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Testing_ToHaveResourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool

receivedRequired

  • Type: *string

resourceTypeRequired

  • Type: *string

propertiesOptional

  • Type: *map[string]interface{}