Merge pull request #26412 from OwenTuz/issue-26411-fix-failing-e2e-test-provider-not-found
Fix bad string match that was causing TestInitProviderNotFound to fail
This commit is contained in:
commit
1817c8ac3c
|
@ -358,7 +358,7 @@ func TestInitProviderNotFound(t *testing.T) {
|
|||
t.Fatal("expected error, got success")
|
||||
}
|
||||
|
||||
if !strings.Contains(stderr, "provider registry.terraform.io/hashicorp/nonexist was not\nfound in any of the search locations\n\n- "+pluginDir) {
|
||||
if !strings.Contains(stderr, "provider registry.terraform.io/hashicorp/nonexist was not\nfound in any of the search locations\n\n - "+pluginDir) {
|
||||
t.Errorf("expected error message is missing from output:\n%s", stderr)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -511,7 +511,7 @@ func (c *InitCommand) getProviders(config *configs.Config, state *states.State,
|
|||
sources := errorTy.Sources
|
||||
displaySources := make([]string, len(sources))
|
||||
for i, source := range sources {
|
||||
displaySources[i] = fmt.Sprintf("- %s", source)
|
||||
displaySources[i] = fmt.Sprintf(" - %s", source)
|
||||
}
|
||||
diags = diags.Append(tfdiags.Sourceless(
|
||||
tfdiags.Error,
|
||||
|
|
Loading…
Reference in New Issue