Documentation ¶
Index ¶
- Constants
- func IsFunc(e ast.Expr, info *types.Info, funcName string) bool
- func IsNamedType(t *types.Named, typeName string) bool
- func IsTypeRetryError(t types.Type) bool
- func IsTypeTestCase(t types.Type) bool
- func IsTypeTestStep(t types.Type) bool
- func PackagePathVersion(moduleVersion int) string
- type RetryErrorInfo
- type RetryFuncInfo
- type TestCaseInfo
- type TestStepInfo
Constants ¶
const ( FuncNameComposeAggregateTestCheckFunc = `ComposeAggregateTestCheckFunc` FuncNameComposeTestCheckFunc = `ComposeTestCheckFunc` FuncNameNonRetryableError = `NonRetryableError` FuncNameParallelTest = `ParallelTest` FuncNamePrefixedUniqueId = `PrefixedUniqueId` FuncNameRetryableError = `RetryableError` FuncNameTest = `Test` FuncNameTestCheckNoResourceAttr = `TestCheckNoResourceAttr` FuncNameTestCheckOutput = `TestCheckOutput` FuncNameTestCheckResourceAttr = `TestCheckResourceAttr` FuncNameTestCheckResourceAttrPair = `TestCheckResourceAttrPair` FuncNameTestCheckResourceAttrPtr = `TestCheckResourceAttrPtr` FuncNameTestCheckResourceAttrSet = `TestCheckResourceAttrSet` FuncNameTestMatchResourceAttr = `TestMatchResourceAttr` FuncNameUniqueId = `UniqueId` )
const ( PackageModule = terraformtype.ModuleTerraformPluginSdk PackageModulePath = `helper/resource` PackageName = `resource` PackagePath = PackageModule + `/` + PackageModulePath )
const ( RetryErrorFieldErr = `Err` RetryErrorFieldRetryable = `Retryable` TypeNameRetryError = `RetryError` )
const ( TestCaseFieldCheckDestroy = `CheckDestroy` TestCaseFieldErrorCheck = `ErrorCheck` TestCaseFieldIDRefreshName = `IDRefreshName` TestCaseFieldIDRefreshIgnore = `IDRefreshIgnore` TestCaseFieldIsUnitTest = `IsUnitTest` TestCaseFieldPreCheck = `PreCheck` TestCaseFieldPreventPostDestroyRefresh = `PreventPostDestroyRefresh` TestCaseFieldProviders = `Providers` TestCaseFieldProviderFactories = `ProviderFactories` TestCaseFieldSteps = `Steps` TypeNameTestCase = `TestCase` )
const ( TestStepFieldCheck = `Check` TestStepFieldConfig = `Config` TestStepFieldDestroy = `Destroy` TestStepFieldExpectError = `ExpectError` TestStepFieldExpectNonEmptyPlan = `ExpectNonEmptyPlan` TestStepFieldImportState = `ImportState` TestStepFieldImportStateId = `ImportStateId` TestStepFieldImportStateIdFunc = `ImportStateIdFunc` TestStepFieldImportStateIdPrefix = `ImportStateIdPrefix` TestStepFieldImportStateCheck = `ImportStateCheck` TestStepFieldImportStateVerify = `ImportStateVerify` TestStepFieldImportStateVerifyIgnore = `ImportStateVerifyIgnore` TestStepFieldPlanOnly = `PlanOnly` TestStepFieldPreConfig = `PreConfig` TestStepFieldPreventDiskCleanup = `PreventDiskCleanup` TestStepFieldPreventPostDestroyRefresh = `PreventPostDestroyRefresh` TestStepFieldResourceName = `ResourceName` TestStepFieldSkipFunc = `SkipFunc` TestStepFieldTaint = `Taint` TypeNameTestStep = `TestStep` )
Variables ¶
This section is empty.
Functions ¶
func IsNamedType ¶
IsNamedType returns if the type name matches and is from the helper/resource package
func IsTypeRetryError ¶
IsTypeRetryError returns if the type is RetryError from the helper/resource package
func IsTypeTestCase ¶
IsTypeTestCase returns if the type is TestCase from the helper/schema package
func IsTypeTestStep ¶
IsTypeTestStep returns if the type is TestStep from the helper/schema package
func PackagePathVersion ¶ added in v0.15.0
PackagePathVersion returns the import path for a module version
Types ¶
type RetryErrorInfo ¶
type RetryErrorInfo struct { AstCompositeLit *ast.CompositeLit Fields map[string]*ast.KeyValueExpr RetryError *retryErrorType TypesInfo *types.Info }
RetryErrorInfo represents all gathered RetryError data for easier access
func NewRetryErrorInfo ¶
func NewRetryErrorInfo(cl *ast.CompositeLit, info *types.Info) *RetryErrorInfo
NewRetryErrorInfo instantiates a RetryErrorInfo
func (*RetryErrorInfo) DeclaresField ¶
func (info *RetryErrorInfo) DeclaresField(fieldName string) bool
DeclaresField returns true if the field name is present in the AST
type RetryFuncInfo ¶
type RetryFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
RetryFuncInfo represents all gathered RetryFunc data for easier access
func NewRetryFuncInfo ¶
func NewRetryFuncInfo(funcDecl *ast.FuncDecl, funcLit *ast.FuncLit, info *types.Info) *RetryFuncInfo
NewRetryFuncInfo instantiates a RetryFuncInfo
type TestCaseInfo ¶
type TestCaseInfo struct { AstCompositeLit *ast.CompositeLit Fields map[string]*ast.KeyValueExpr TestCase *testCaseType TypesInfo *types.Info }
TestCaseInfo represents all gathered TestCase data for easier access
func NewTestCaseInfo ¶
func NewTestCaseInfo(cl *ast.CompositeLit, info *types.Info) *TestCaseInfo
NewTestCaseInfo instantiates a TestCaseInfo
func (*TestCaseInfo) DeclaresField ¶
func (info *TestCaseInfo) DeclaresField(fieldName string) bool
DeclaresField returns true if the field name is present in the AST
type TestStepInfo ¶
type TestStepInfo struct { AstCompositeLit *ast.CompositeLit Fields map[string]*ast.KeyValueExpr TestStep *testStepType TypesInfo *types.Info }
TestStepInfo represents all gathered TestStep data for easier access
func NewTestStepInfo ¶
func NewTestStepInfo(cl *ast.CompositeLit, info *types.Info) *TestStepInfo
NewTestStepInfo instantiates a TestStepInfo
func (*TestStepInfo) DeclaresField ¶
func (info *TestStepInfo) DeclaresField(fieldName string) bool
DeclaresField returns true if the field name is present in the AST