From 07dbe7bd5f39701af11f722790b22393e5edb1e1 Mon Sep 17 00:00:00 2001 From: Ben Drucker Date: Thu, 7 May 2020 22:23:11 -0700 Subject: [PATCH] update context tests to expect provider validation to be skipped --- terraform/context_validate_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/context_validate_test.go b/terraform/context_validate_test.go index f811dfcad..6ee9985c7 100644 --- a/terraform/context_validate_test.go +++ b/terraform/context_validate_test.go @@ -588,12 +588,12 @@ func TestContext2Validate_providerConfig_badEmpty(t *testing.T) { }) p.PrepareProviderConfigResponse = providers.PrepareProviderConfigResponse{ - Diagnostics: tfdiags.Diagnostics{}.Append(fmt.Errorf("bad")), + Diagnostics: tfdiags.Diagnostics{}.Append(fmt.Errorf("should not be called")), } diags := c.Validate() - if !diags.HasErrors() { - t.Fatalf("succeeded; want error") + if diags.HasErrors() { + t.Fatalf("unexpected error: %v", diags) } }