Files
opentf/internal/command/testdata/test/default_variables/main.tftest.hcl
Oleksandr Levchenkov 32ca523689 fix: type defaults for variables in tests (#2244)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-12-04 16:48:08 +02:00

24 lines
525 B
HCL

run "applies_defaults" {
assert {
condition = var.input == "Hello, world!"
error_message = "should have applied default value"
}
variables {
another_input = {
optional_string = "Hello, world!"
}
}
assert {
condition = var.another_input.optional_string == "Hello, world!"
error_message = "should have used custom value from test file"
}
assert {
condition = var.another_input.optional_number == 42
error_message = "should have used default type value"
}
}