diff --git a/internal/command/test_test.go b/internal/command/test_test.go index 9f0e6c0130e2..346b8f1a5d13 100644 --- a/internal/command/test_test.go +++ b/internal/command/test_test.go @@ -219,13 +219,19 @@ func TestTest_Runs(t *testing.T) { code: 0, }, "mocking": { - expectedOut: []string{"6 passed, 0 failed."}, + expectedOut: []string{"7 passed, 0 failed."}, code: 0, }, "mocking-invalid": { expectedErr: []string{"Invalid outputs attribute"}, initCode: 1, }, + "mocking-error": { + expectedErr: []string{"Unknown condition value", + "test_resource.primary[0].id", + }, + code: 1, + }, "dangling_data_block": { expectedOut: []string{"2 passed, 0 failed."}, code: 0, diff --git a/internal/command/testdata/test/mocking-error/tests/plan_mocked_overridden.tftest.hcl b/internal/command/testdata/test/mocking-error/tests/plan_mocked_overridden.tftest.hcl index 5efea37e18a5..85b9df6657c3 100644 --- a/internal/command/testdata/test/mocking-error/tests/plan_mocked_overridden.tftest.hcl +++ b/internal/command/testdata/test/mocking-error/tests/plan_mocked_overridden.tftest.hcl @@ -26,7 +26,7 @@ run "test" { command = plan assert { - condition = test_resource.primary[0].id != "bbbb" + condition = test_resource.primary[0].id == "bbbb" error_message = "plan should not have the overridden value" }