Documentation ¶
Index ¶
- Variables
- func CheckConverionToAttrValue(t *testing.T, dt datasource.DataSource, attributeName string, ...)
- func IsCurrentApmPlanEmpty(res *models.ApmResourceInfo) bool
- func IsCurrentEsPlanEmpty(res *models.ElasticsearchResourceInfo) bool
- func IsCurrentEssPlanEmpty(res *models.EnterpriseSearchResourceInfo) bool
- func IsCurrentIntegrationsServerPlanEmpty(res *models.IntegrationsServerResourceInfo) bool
- func IsCurrentKibanaPlanEmpty(res *models.KibanaResourceInfo) bool
- func MemoryToState(mem int32) string
- func MultiGetenvOrDefault(keys []string, defaultValue string) string
- func NewResourceData(t *testing.T, params ResDataParams) *schema.ResourceData
- func StringListAsType(in []string) types.List
- func StringMapAsType(in map[string]string) types.Map
- func StringToBool(str string) (bool, error)
- func TrafficFilterNotFound(err error) bool
- type ResDataParams
- type ResourceKind
Constants ¶
This section is empty.
Variables ¶
var GetEnv = os.Getenv
used in tests
Functions ¶
func CheckConverionToAttrValue ¶ added in v0.6.0
func CheckConverionToAttrValue(t *testing.T, dt datasource.DataSource, attributeName string, attributeValue types.List)
Check conversion to attr.Value it should catch cases when e.g. the func under test returns types.List{}
func IsCurrentApmPlanEmpty ¶
func IsCurrentApmPlanEmpty(res *models.ApmResourceInfo) bool
IsCurrentApmPlanEmpty checks the apm resource current plan is empty.
func IsCurrentEsPlanEmpty ¶
func IsCurrentEsPlanEmpty(res *models.ElasticsearchResourceInfo) bool
IsCurrentEsPlanEmpty checks that the elasticsearch resource current plan is empty.
func IsCurrentEssPlanEmpty ¶
func IsCurrentEssPlanEmpty(res *models.EnterpriseSearchResourceInfo) bool
IsCurrentEssPlanEmpty checks the enterprise search resource current plan is empty.
func IsCurrentIntegrationsServerPlanEmpty ¶ added in v0.4.0
func IsCurrentIntegrationsServerPlanEmpty(res *models.IntegrationsServerResourceInfo) bool
IsCurrentIntegrationsServerPlanEmpty checks the IntegrationsServer resource current plan is empty.
func IsCurrentKibanaPlanEmpty ¶
func IsCurrentKibanaPlanEmpty(res *models.KibanaResourceInfo) bool
IsCurrentKibanaPlanEmpty checks the kibana resource current plan is empty.
func MemoryToState ¶
MemoryToState parses a megabyte int notation to a gigabyte notation.
func MultiGetenvOrDefault ¶ added in v0.6.0
MultiGetenvOrDefault returns the value of the first environment variable in the given list that has a non-empty value. If none of the environment variables have a value, the default value is returned.
func NewResourceData ¶
func NewResourceData(t *testing.T, params ResDataParams) *schema.ResourceData
NewResourceData creates a ResourceData from a raw configuration map and schema.
func StringListAsType ¶ added in v0.6.0
func StringToBool ¶ added in v0.6.0
func TrafficFilterNotFound ¶
TrafficFilterNotFound returns true when the error is a 404 or 403.
Types ¶
type ResDataParams ¶
type ResDataParams struct { // ID to set for the resource. ID string // The resource's schema. Schema map[string]*schema.Schema // The current resource state, to simulate a create or a case where no // previous state has been persisted, only State should be specified. State map[string]interface{} // The desired resource configuration, this is useful to simulate "update" // changes on a given resource. Change map[string]interface{} }
ResDataParams holds the raw configuration for NewResourceData to consume
func (ResDataParams) Validate ¶
func (params ResDataParams) Validate() error
Validate the parameters
type ResourceKind ¶ added in v0.6.0
type ResourceKind int
const ( ApmResourceKind ResourceKind = iota ElasticsearchResourceKind EnterpriseSearchResourceKind IntegrationsServerResourceKind KibanaResourceKind )
func (ResourceKind) Name ¶ added in v0.6.0
func (rk ResourceKind) Name() string