Documentation ¶
Index ¶
- Variables
- func CheckResourceIDChanged(resourceName string, resourceID *string) resource.TestCheckFunc
- func CheckResourceIDPersisted(resourceName string, resourceID *string) resource.TestCheckFunc
- func CheckResourceRawIDMatches(res1, attr1, res2, attr2 string) resource.TestCheckFunc
- func PreCheck(_ *testing.T)
- type TestTools
Constants ¶
This section is empty.
Variables ¶
var BodyMatcherIgnore = []string{
"organization",
"organization_id",
"project_id",
"project",
}
BodyMatcherIgnore contains the list of json body keys that should be ignored when matching requests with cassettes
var QueryMatcherIgnore = []string{
"organization_id",
}
QueryMatcherIgnore contains the list of query value that should be ignored when matching requests with cassettes
var SensitiveFields = map[string]interface{}{
"secret_key": "00000000-0000-0000-0000-000000000000",
}
SensitiveFields is a map with keys listing fields that should be anonymized value will be set in place of its old value
var UpdateCassettes = flag.Bool("cassettes", os.Getenv("TF_UPDATE_CASSETTES") == "true", "Record Cassettes")
UpdateCassettes will update all cassettes of a given test
Functions ¶
func CheckResourceIDChanged ¶
func CheckResourceIDChanged(resourceName string, resourceID *string) resource.TestCheckFunc
CheckResourceIDChanged checks that the ID of the resource has indeed changed, in case of ForceNew for example. It will fail if resourceID is empty so be sure to use acctest.CheckResourceIDPersisted first in a test suite.
func CheckResourceIDPersisted ¶
func CheckResourceIDPersisted(resourceName string, resourceID *string) resource.TestCheckFunc
CheckResourceIDPersisted checks that the ID of the resource is the same throughout tests of migration or mutation It can be used to check that no ForceNew has been done
func CheckResourceRawIDMatches ¶
func CheckResourceRawIDMatches(res1, attr1, res2, attr2 string) resource.TestCheckFunc
CheckResourceRawIDMatches asserts the equality of IDs from two specified attributes of two Scaleway resources.