mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-15 11:13:09 -06:00
expect_runtime_check_pass_command_plan_expected
This commit is contained in:
parent
4988185c58
commit
abf03204d8
@ -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,
|
||||
|
8
internal/command/testdata/test/expect_runtime_check_pass_command_plan_expected/main.tf
vendored
Normal file
8
internal/command/testdata/test/expect_runtime_check_pass_command_plan_expected/main.tf
vendored
Normal 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"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
run "test" {
|
||||
command = plan
|
||||
expect_failures = [
|
||||
check.check
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user