mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
expect_runtime_check_fail_command_plan
This commit is contained in:
parent
94400dfebb
commit
a444b7e6f2
@ -84,6 +84,10 @@ func TestTest(t *testing.T) {
|
||||
expected: "0 passed, 1 failed.",
|
||||
code: 1,
|
||||
},
|
||||
"expect_runtime_check_fail_command_plan": {
|
||||
expected: "0 passed, 1 failed.",
|
||||
code: 1,
|
||||
},
|
||||
"expect_failures_resources": {
|
||||
expected: "1 passed, 0 failed.",
|
||||
code: 0,
|
||||
@ -183,7 +187,7 @@ func TestTest(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
func TestTest_Broken_HCL_Files(t *testing.T) {
|
||||
func TestTest_Broken_Full_Output(t *testing.T) {
|
||||
tcs := map[string]struct {
|
||||
override string
|
||||
args []string
|
||||
@ -195,6 +199,10 @@ func TestTest_Broken_HCL_Files(t *testing.T) {
|
||||
expected: "Unsupported block type",
|
||||
code: 1,
|
||||
},
|
||||
"expect_runtime_check_fail_command_plan": {
|
||||
expected: "Check block assertion known after apply",
|
||||
code: 1,
|
||||
},
|
||||
"broken_wrong_block_resource": {
|
||||
expected: "Blocks of type \"resource\" are not expected here.",
|
||||
code: 1,
|
||||
|
8
internal/command/testdata/test/expect_runtime_check_fail_command_plan/main.tf
vendored
Normal file
8
internal/command/testdata/test/expect_runtime_check_fail_command_plan/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"
|
||||
}
|
||||
}
|
3
internal/command/testdata/test/expect_runtime_check_fail_command_plan/main.tftest.hcl
vendored
Normal file
3
internal/command/testdata/test/expect_runtime_check_fail_command_plan/main.tftest.hcl
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
run "test" {
|
||||
command = plan
|
||||
}
|
Loading…
Reference in New Issue
Block a user