From b14677bd9a7a6ef38e5c96bd0bb530054f8639b3 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 22 Jun 2017 15:37:32 -0400 Subject: [PATCH] look for new error output --- terraform/context_refresh_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terraform/context_refresh_test.go b/terraform/context_refresh_test.go index 0a977b4cc..0e84b8b54 100644 --- a/terraform/context_refresh_test.go +++ b/terraform/context_refresh_test.go @@ -2,6 +2,7 @@ package terraform import ( "reflect" + "regexp" "sort" "strings" "sync" @@ -861,7 +862,7 @@ func TestContext2Refresh_unknownProvider(t *testing.T) { t.Fatal("successfully created context; want error") } - if !strings.Contains(err.Error(), "Can't satisfy provider requirements") { + if !regexp.MustCompile(`provider ".+" is not available`).MatchString(err.Error()) { t.Fatalf("wrong error: %s", err) } }