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.
This commit is contained in:
James Bardin 2020-06-15 14:39:16 -04:00
parent e36d300efd
commit b35a56cf6e
1 changed files with 3 additions and 3 deletions

View File

@ -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)
}
}