Add test case to ensure no regression of already fixed crash (#36583)

pull/36839/head
Liam Cervante 1 year ago committed by GitHub
parent 9953a638d8
commit aaf617d6d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -317,6 +317,11 @@ func TestTest_Runs(t *testing.T) {
expectedErr: []string{"Test assertion failed", "resource renamed without moved block"},
code: 1,
},
"unapplyable-plan": {
expectedOut: []string{"0 passed, 1 failed."},
expectedErr: []string{"Cannot apply non-applyable plan"},
code: 1,
},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {

@ -0,0 +1,8 @@
resource "test_resource" "example" {
value = "bar"
}
output "value" {
value = test_resource.example.value
}

@ -0,0 +1,11 @@
run "test" {
command = apply
plan_options {
mode = refresh-only
}
assert {
condition = test_resource.example.value == "bar"
error_message = "wrong value"
}
}
Loading…
Cancel
Save