From 08f695a9a068a2ae5bebeefb6bffbd348e3f0a0c Mon Sep 17 00:00:00 2001 From: Adam Snyder Date: Tue, 12 Apr 2022 12:13:50 -0700 Subject: [PATCH] helper/resource: Improve "unsupported test mode" message (#925) The "unsupported test mode" message does not tell you which step of the test failed, unlike the other fatal errors in the `runNewTest` function here. This change adds the step number to the error message to make it more useful and more consistent. --- helper/resource/testing_new.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper/resource/testing_new.go b/helper/resource/testing_new.go index 9c19b0d17ce..1b93e0bb962 100644 --- a/helper/resource/testing_new.go +++ b/helper/resource/testing_new.go @@ -197,7 +197,7 @@ func runNewTest(ctx context.Context, t testing.T, c TestCase, helper *plugintest continue } - t.Fatal("Unsupported test mode") + t.Fatalf("Step %d/%d, unsupported test mode", i+1, len(c.Steps)) } }