expect_runtime_check_pass_command_plan_expected

This commit is contained in:
Elbaz 2023-08-29 12:20:34 +03:00
parent 4988185c58
commit abf03204d8
3 changed files with 18 additions and 0 deletions

View File

@ -84,6 +84,10 @@ func TestTest(t *testing.T) {
expected: "1 passed, 0 failed.",
code: 0,
},
"expect_runtime_check_pass_command_plan_expected": {
expected: "1 passed, 0 failed.",
code: 0,
},
"expect_runtime_check_fail_command_plan": {
expected: "0 passed, 1 failed.",
code: 1,

View File

@ -0,0 +1,8 @@
resource "test_resource" "resource" {}
check "check" {
assert {
condition = test_resource.resource.id == ""
error_message = "check block: resource has no id"
}
}

View File

@ -0,0 +1,6 @@
run "test" {
command = plan
expect_failures = [
check.check
]
}