testing framework: change test file extension to .tftest.hcl (#33553)

This commit is contained in:
Liam Cervante
2023-07-20 16:57:05 +02:00
committed by GitHub
parent ca85d3bf85
commit c91f91cc9e
51 changed files with 177 additions and 176 deletions

View File

@@ -0,0 +1,37 @@
provider "test" {
data_prefix = "data"
resource_prefix = "resource"
}
provider "test" {
alias = "setup"
# The setup provider will write into the main providers data sources.
resource_prefix = "data"
}
variables {
managed_id = "B853C121"
}
run "setup" {
module {
source = "./setup"
}
variables {
value = "Hello, world!"
id = "B853C121"
}
providers = {
test = test.setup
}
}
run "test" {
assert {
condition = test_resource.created.value == "Hello, world!"
error_message = "bad value"
}
}