diff --git a/helper/resource/testing.go b/helper/resource/testing.go index e1156422e..43bee4ce4 100644 --- a/helper/resource/testing.go +++ b/helper/resource/testing.go @@ -266,7 +266,8 @@ func testStep( } } - return state, err + // Made it here? Good job test step! + return state, nil } // ComposeTestCheckFunc lets you compose multiple TestCheckFuncs into diff --git a/helper/resource/testing_test.go b/helper/resource/testing_test.go index a6c944eac..9d42ab634 100644 --- a/helper/resource/testing_test.go +++ b/helper/resource/testing_test.go @@ -165,7 +165,10 @@ func TestTest_stepError(t *testing.T) { if !mt.failed() { t.Fatal("test should've failed") } - t.Logf("Fail message: %s", mt.failMessage()) + expected := "Step 0 error: Check failed: error" + if mt.failMessage() != expected { + t.Fatalf("Expected message: %s\n\ngot:\n\n%s", expected, mt.failMessage()) + } if !checkDestroy { t.Fatal("didn't call check for destroy")