mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
testing framework: change test file extension to .tftest.hcl (#33553)
This commit is contained in:
37
internal/command/testdata/test/with_provider_alias/main.tftest.hcl
vendored
Normal file
37
internal/command/testdata/test/with_provider_alias/main.tftest.hcl
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user