Skip to content

Commit 6bfae8e

Browse files
committed
fix tests
1 parent f0bfb61 commit 6bfae8e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

internal/command/test_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,19 @@ func TestTest_Runs(t *testing.T) {
219219
code: 0,
220220
},
221221
"mocking": {
222-
expectedOut: []string{"6 passed, 0 failed."},
222+
expectedOut: []string{"7 passed, 0 failed."},
223223
code: 0,
224224
},
225225
"mocking-invalid": {
226226
expectedErr: []string{"Invalid outputs attribute"},
227227
initCode: 1,
228228
},
229+
"mocking-error": {
230+
expectedErr: []string{"Unknown condition value",
231+
"test_resource.primary[0].id",
232+
},
233+
code: 1,
234+
},
229235
"dangling_data_block": {
230236
expectedOut: []string{"2 passed, 0 failed."},
231237
code: 0,

internal/command/testdata/test/mocking-error/tests/plan_mocked_overridden.tftest.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ run "test" {
2626
command = plan
2727

2828
assert {
29-
condition = test_resource.primary[0].id != "bbbb"
29+
condition = test_resource.primary[0].id == "bbbb"
3030
error_message = "plan should not have the overridden value"
3131
}
3232

0 commit comments

Comments
 (0)