You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/command/testdata/test/mocking/tests/module_mocked.tftest.hcl

45 lines
717 B

override_module {
target = module.child[1]
outputs = {
primary = [
{
id = "bbbb"
}
]
secondary = [
{
id = "cccc"
}
]
}
}
variables {
instances = 3
child_instances = 1
}
run "test" {
assert {
condition = module.child[0].primary[0].id != "bbbb"
error_message = "wrongly applied mocks"
}
assert {
condition = module.child[1].primary[0].id == "bbbb"
error_message = "did not apply mocks"
}
assert {
condition = module.child[1].secondary[0].id == "cccc"
error_message = "did not apply mocks"
}
assert {
condition = module.child[2].secondary[0].id != "cccc"
error_message = "wrongly applied mocks"
}
}