Documentation ¶
Index ¶
- Constants
- func CreateTemp(body string) (string, func(), error)
- func IntegrationTest(t *testing.T, conf IntegrationTestConfig, c resource.TestCase)
- func IsConnectableWithAdminPassword(adminPassword string) resource.CheckResourceAttrWithFunc
- func MustJSON(s interface{}) []byte
- func UnitTest(t *testing.T, conf UnitTestConfig, c resource.TestCase)
- type AttributeSetter
- type IntegrationTestConfig
- type UnitTestConfig
- type UpdatableConfig
- func (uc UpdatableConfig) String() string
- func (uc UpdatableConfig) WithAPIKey(apiKey string) UpdatableConfig
- func (uc UpdatableConfig) WithAPIKeyPath(apiKeyPath string) UpdatableConfig
- func (uc UpdatableConfig) WithAPIServiceURL(url string) UpdatableConfig
- func (uc UpdatableConfig) WithWorkspaceGetDataSource(workspaceName string) AttributeSetter
- func (uc UpdatableConfig) WithWorkspaceGroupGetDataSource(workspaceGroupName string) AttributeSetter
- func (uc UpdatableConfig) WithWorkspaceGroupResource(workspaceGroupName string) AttributeSetter
- func (uc UpdatableConfig) WithWorkspaceListDataSource(workspaceListName string) AttributeSetter
- func (uc UpdatableConfig) WithWorkspaceResource(workspaceName string) AttributeSetter
Constants ¶
const (
UnusedAPIKey = "foo"
)
Variables ¶
This section is empty.
Functions ¶
func CreateTemp ¶
CreateTemp creates a temporary file with body and returns the path and the cleanup callback.
func IntegrationTest ¶
func IntegrationTest(t *testing.T, conf IntegrationTestConfig, c resource.TestCase)
func IsConnectableWithAdminPassword ¶
func IsConnectableWithAdminPassword(adminPassword string) resource.CheckResourceAttrWithFunc
IsConnectableWithAdminPassword attempts to connect to the workspace and execute a sample SQL query.
Types ¶
type AttributeSetter ¶
type AttributeSetter func(name string, val cty.Value) UpdatableConfig
AttributeSetter is a type for setting an hcl attribute for a provider, data source, or resource.
type IntegrationTestConfig ¶
type UnitTestConfig ¶
type UpdatableConfig ¶
type UpdatableConfig string
UpdatableConfig is the convenience for updating the config *.tf examples. This enables overriding values like an API key of the provider for testing purposes.
func (UpdatableConfig) String ¶
func (uc UpdatableConfig) String() string
String shows the resulting *.tf config with all the overrides applied.
func (UpdatableConfig) WithAPIKey ¶
func (uc UpdatableConfig) WithAPIKey(apiKey string) UpdatableConfig
WithAPIKey extends the config with the API key if the key is not empty.
func (UpdatableConfig) WithAPIKeyPath ¶
func (uc UpdatableConfig) WithAPIKeyPath(apiKeyPath string) UpdatableConfig
WithAPIKeyPath extends the config with the API key path.
func (UpdatableConfig) WithAPIServiceURL ¶
func (uc UpdatableConfig) WithAPIServiceURL(url string) UpdatableConfig
WithAPIKey extends the config with the API service url if the url is not empty.
func (UpdatableConfig) WithWorkspaceGetDataSource ¶
func (uc UpdatableConfig) WithWorkspaceGetDataSource(workspaceName string) AttributeSetter
func (UpdatableConfig) WithWorkspaceGroupGetDataSource ¶
func (uc UpdatableConfig) WithWorkspaceGroupGetDataSource(workspaceGroupName string) AttributeSetter
func (UpdatableConfig) WithWorkspaceGroupResource ¶
func (uc UpdatableConfig) WithWorkspaceGroupResource(workspaceGroupName string) AttributeSetter
func (UpdatableConfig) WithWorkspaceListDataSource ¶
func (uc UpdatableConfig) WithWorkspaceListDataSource(workspaceListName string) AttributeSetter
func (UpdatableConfig) WithWorkspaceResource ¶
func (uc UpdatableConfig) WithWorkspaceResource(workspaceName string) AttributeSetter