From b35a56cf6eeadb2d5b38b8602d8a39f82e266c31 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 15 Jun 2020 14:39:16 -0400 Subject: [PATCH] command tests looked for providers in the graphs The quotes in provider names needs to be escaped, so these tests were looking for the wrong output to begin with. --- command/graph_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/graph_test.go b/command/graph_test.go index 6600a7eab..bb54d2d7a 100644 --- a/command/graph_test.go +++ b/command/graph_test.go @@ -33,7 +33,7 @@ func TestGraph(t *testing.T) { } output := ui.OutputWriter.String() - if !strings.Contains(output, `provider["registry.terraform.io/hashicorp/test"]`) { + if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) { t.Fatalf("doesn't look like digraph: %s", output) } } @@ -80,7 +80,7 @@ func TestGraph_noArgs(t *testing.T) { } output := ui.OutputWriter.String() - if !strings.Contains(output, `provider["registry.terraform.io/hashicorp/test"]`) { + if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) { t.Fatalf("doesn't look like digraph: %s", output) } } @@ -161,7 +161,7 @@ func TestGraph_plan(t *testing.T) { } output := ui.OutputWriter.String() - if !strings.Contains(output, `provider["registry.terraform.io/hashicorp/test"]`) { + if !strings.Contains(output, `provider[\"registry.terraform.io/hashicorp/test\"]`) { t.Fatalf("doesn't look like digraph: %s", output) } }